Skip to content

Repo status overview#1017

Merged
spacewander merged 3 commits intotj:masterfrom
guenhter:repo-status-overview
Jan 13, 2023
Merged

Repo status overview#1017
spacewander merged 3 commits intotj:masterfrom
guenhter:repo-status-overview

Conversation

@guenhter
Copy link
Copy Markdown
Contributor

@guenhter guenhter commented Jan 9, 2023

Fix #1006

This changes allow to print the summary of all the repositories in a table like this:

git bulk -q summary --oneline | column -t -s /                                                                                                                                   
Core command "summary" accepted.
keycloak-cxf-admin-client            age: 6 years                last active: 1 year, 2 months ago    active on 4 days      commits: 16      uncommitted: 0
dev-infrastructure-automation        age: 5 weeks                last active: 2 hours ago             active on 8 days      commits: 13      uncommitted: 0
gitlab-project-settings-corrector    age: 3 months               last active: 3 months ago            active on 1 days      commits: 2       uncommitted: 0
gitlab-k8s-cleaner                   age: 3 months               last active: 3 months ago            active on 2 days      commits: 7       uncommitted: 0
ci-docker-images                     age: 3 months               last active: 3 months ago            active on 3 days      commits: 8       uncommitted: 0
fid-python                           age: 7 weeks                last active: 3 weeks ago             active on 11 days     commits: 22      uncommitted: 0
deployment-management                age: 3 months               last active: 3 weeks ago             active on 28 days     commits: 140     uncommitted: 0

Additionally, the age info was fixed in the summary command. Using git log --reversed -n 1 actually gives the latest commit, not the oldest.

Comment thread man/git-summary.md Outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oneline?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:) typo. Fixed.

Comment thread bin/git-summary Outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why revert it to an old version?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you can confirm that it seems that git first resolves the -n 1 and then it resolves --reverse what ends up in not getting the first commit but the latest.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My tests gave me the following:

$  git log --reverse --pretty=oneline --format="%ar" -n 1
6 days ago

$ git log --reverse --pretty=oneline --format="%ar" | head -n 1
12 years ago

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also the git-log documentation says so:

Commit Limiting
...
Note that these are applied before commit ordering and formatting options, such as --reverse.

-, -n , --max-count=
Limit the number of commits to output.

@spacewander spacewander merged commit 04eb5c0 into tj:master Jan 13, 2023
@guenhter guenhter deleted the repo-status-overview branch January 16, 2023 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: List all repos of a workspace with one line per repo

2 participants