-
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
Added --full flag to "git-count" #1105
base: main
Are you sure you want to change the base?
Conversation
Add --full flag to return all possible local repo commits count.
Removed echo after git command execution.
Added --full flag to "git count"
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.
Let's update the doc under https://github.com/tj/git-extras/tree/main/man
@@ -2,7 +2,8 @@ | |||
|
|||
if test "$1" = "--all"; then | |||
git shortlog -n -s | awk '{print substr($0,index($0,$2)) " (" $1 ")"}' | |||
echo |
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.
We should also output total for --all
.
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.
Without this change, the output will be different.
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.
@havocesp
This comment is not resolved yet.
…h completion files.
Added short flags "-a" for "--all" and "-f" for "--full" to git-count. Updated zsh and fish completion files with new flags added.
Added --full flag as possible argument and a short example.
Added --full flag and a short example at git-count.html file.
Added --full flag and a short example at git-count.1 man page file.
@@ -2,7 +2,8 @@ | |||
|
|||
if test "$1" = "--all"; then | |||
git shortlog -n -s | awk '{print substr($0,index($0,$2)) " (" $1 ")"}' | |||
echo |
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.
Without this change, the output will be different.
Co-authored-by: 罗泽轩 <[email protected]>
Man git count
@@ -2,7 +2,8 @@ | |||
|
|||
if test "$1" = "--all"; then | |||
git shortlog -n -s | awk '{print substr($0,index($0,$2)) " (" $1 ")"}' | |||
echo |
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.
@havocesp
This comment is not resolved yet.
@@ -23,6 +24,12 @@ git-count(1) -- Show commit count | |||
$ git count | |||
|
|||
total 1844 | |||
|
|||
Output full commits total: |
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.
Let's add more words to explain the difference between the regular total and the full total.
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.
The regular total count from current commit to the first one and the full total count all commits available at repository.
Example: