-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repo status overview #1017
Repo status overview #1017
Conversation
man/git-summary.md
Outdated
@@ -101,6 +105,11 @@ Shows a summary of the repository or a path within it. | |||
authors : | |||
... | |||
|
|||
Online summary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oneline?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:) typo. Fixed.
@@ -145,7 +149,7 @@ format_authors() { | |||
# fetch repository age from oldest commit | |||
# | |||
repository_age() { | |||
git log --reverse --pretty=oneline --format="%ar" -n 1 | LC_ALL=C sed 's/ago//' | |||
git log --reverse --pretty=oneline --format="%ar" | head -n 1 | LC_ALL=C sed 's/ago//' |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Fix #1006
This changes allow to print the summary of all the repositories in a table like this:
Additionally, the age info was fixed in the summary command. Using
git log --reversed -n 1
actually gives the latest commit, not the oldest.