diff --git a/bin/git-standup b/bin/git-standup index 2de7601..9a0c636 100755 --- a/bin/git-standup +++ b/bin/git-standup @@ -5,7 +5,7 @@ usage() { cat <] [-w ] [-d ] [-m ] [-g] [-h] [-f] + git standup [-a ] [-w ] [-d ] [-m ] [-g] [-h] [-f] [-B] [-n /dev/null ## Show the detail only if it is a git repository if [[ -d ".git" || -f ".git" ]] ; then - if GITOUT=$(eval ${GIT_LOG_COMMAND}); then + if GITOUT=$(git_output); then ## Only output if there is some activities if [[ ! -z "$GITOUT" ]] ; then echo "${BOLD}${UNDERLINE}${YELLOW}$(basename "$DIR")${NORMAL}" echo "$GITOUT" + echo "" fi else echo "Repository under $DIR could not be queried." >&2 @@ -209,7 +241,7 @@ else git fetch --all > /dev/null 2>&1 fi - if GITOUT=$(eval ${GIT_LOG_COMMAND}); then + if GITOUT=$(git_output); then if [[ ! -z "$GITOUT" ]] ; then echo "$GITOUT" else diff --git a/etc/git-extras-completion.zsh b/etc/git-extras-completion.zsh index 6a078f2..b05e0cb 100644 --- a/etc/git-extras-completion.zsh +++ b/etc/git-extras-completion.zsh @@ -418,7 +418,8 @@ _git-standup() { '-g[Display GPG signed info]' \ '-h[Display help message]' \ '-L[Enable the inclusion of symbolic links]' \ - '-m[The depth of recursive directory search]' + '-m[The depth of recursive directory search]' \ + '-B[Display the commits in branch groups]' } _git-summary() { diff --git a/man/git-standup.1 b/man/git-standup.1 index 8fa4b01..6a9acce 100644 --- a/man/git-standup.1 +++ b/man/git-standup.1 @@ -1,13 +1,13 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "GIT\-STANDUP" "1" "October 2017" "" "Git Extras" +.TH "GIT\-STANDUP" "1" "November 2019" "" "Git Extras" . .SH "NAME" \fBgit\-standup\fR \- Recall the commit history . .SH "SYNOPSIS" -\fBgit\-standup\fR [\-a author] [\-m depth] [\-d days ago] [\-D date format] [\-g] [\-L] [\-f] +\fBgit\-standup\fR [\-a author] [\-m depth] [\-d days ago] [\-D date format] [\-g] [\-L] [\-f] [\-B] [\-n number of commits] . .P \fBgit\-standup\fR \-h @@ -66,6 +66,18 @@ Fetch the latest commits before showing commit history\. .P The former version of \fBgit standup\fR accepted \fB \fR as options\. This interface is deprecated now, and please avoid to use it! . +.P +\-B +. +.P +Display the commits in branch groups\. +. +.P +\-n number\-of\-commits +. +.P +Limit the number of commits displayed per group\. By default, the limitation is applied in the repository level\. For example, if you have 3 repositories under the current directory, \fBgit standup \.\.\. \-n 1\fR will show you 3 commits at most\. When \fB\-B\fR is specific, the limitation is applied in the branch level\. For instance, if each of your 3 repositories have 2 branches, \fBgit standup \.\.\. \-B \-n 1\fR will display 6 commits at most\. +. .SH "EXAMPLES" This shows your commits since yesterday: . @@ -120,6 +132,31 @@ someProject/ . .IP "" 0 . +.P +By specifying the \fB\-B\fR option, git\-standuo will group the commits in branches: +. +.IP "" 4 +. +.nf + +$ git standup \-B \-a spacewander \-d 7 + +git\-summary\-cleanup +f788c78 \- git\-summary: clean up other shellcheck warnings (23 hours ago) +3e8c3ab \- git\-summary: fix incorrect active days when commits range is given (23 hours ago) +ff991ac \- git\-summary: remove useless result function\. (23 hours ago) +203f5b4 \- git\-summary: add \-\-dedup\-by\-email to remove duplicate users (5 days ago) + +master +203f5b4 \- git\-summary: add \-\-dedup\-by\-email to remove duplicate users (5 days ago) +. +.fi +. +.IP "" 0 +. +.P +Note that the same commit can be seen in different branches\. +. .SH "AUTHOR" Originally from https://github\.com/kamranahmedse/git\-standup . diff --git a/man/git-standup.html b/man/git-standup.html index 88651f5..116e9c6 100644 --- a/man/git-standup.html +++ b/man/git-standup.html @@ -76,7 +76,7 @@

SYNOPSIS

-

git-standup [-a author] [-m depth] [-d days ago] [-D date format] [-g] [-L] [-f]

+

git-standup [-a author] [-m depth] [-d days ago] [-D date format] [-g] [-L] [-f] [-B] [-n number of commits]

git-standup -h

@@ -122,6 +122,20 @@ Defaults to $(git config user.name).

The former version of git standup accepted <author> <since> <until> as options. This interface is deprecated now, and please avoid to use it!

+

-B

+ +

Display the commits in branch groups.

+ +

-n number-of-commits

+ +

Limit the number of commits displayed per group. +By default, the limitation is applied in the repository level. For example, if you +have 3 repositories under the current directory, git standup ... -n 1 will +show you 3 commits at most. +When -B is specific, the limitation is applied in the branch level. For instance, +if each of your 3 repositories have 2 branches, git standup ... -B -n 1 will +display 6 commits at most.

+

EXAMPLES

This shows your commits since yesterday:

@@ -154,6 +168,22 @@ someProject/ 46fef1d - use tinyXML to configure (7 days ago) <spacewander> +

By specifying the -B option, git-standuo will group the commits in branches:

+ +
$ git standup -B -a spacewander -d 7
+
+git-summary-cleanup
+f788c78 - git-summary: clean up other shellcheck warnings (23 hours ago) <spacewander>
+3e8c3ab - git-summary: fix incorrect active days when commits range is given (23 hours ago) <spacewander>
+ff991ac - git-summary: remove useless result function. (23 hours ago) <spacewander>
+203f5b4 - git-summary: add --dedup-by-email to remove duplicate users (5 days ago) <spacewander>
+
+master
+203f5b4 - git-summary: add --dedup-by-email to remove duplicate users (5 days ago) <spacewander>
+
+ +

Note that the same commit can be seen in different branches.

+

AUTHOR

Originally from https://github.com/kamranahmedse/git-standup

@@ -169,7 +199,7 @@ someProject/
  1. -
  2. October 2017
  3. +
  4. November 2019
  5. git-standup(1)
diff --git a/man/git-standup.md b/man/git-standup.md index 8f70567..671ab77 100644 --- a/man/git-standup.md +++ b/man/git-standup.md @@ -3,7 +3,7 @@ git-standup(1) -- Recall the commit history ## SYNOPSIS -`git-standup` [-a author] [-m depth] [-d days ago] [-D date format] [-g] [-L] [-f] +`git-standup` [-a author] [-m depth] [-d days ago] [-D date format] [-g] [-L] [-f] [-B] [-n number of commits] `git-standup` -h @@ -49,6 +49,20 @@ Fetch the latest commits before showing commit history. The former version of `git standup` accepted ` ` as options. This interface is deprecated now, and please avoid to use it! +-B + +Display the commits in branch groups. + +-n number-of-commits + +Limit the number of commits displayed per group. +By default, the limitation is applied in the repository level. For example, if you +have 3 repositories under the current directory, `git standup ... -n 1` will +show you 3 commits at most. +When `-B` is specific, the limitation is applied in the branch level. For instance, +if each of your 3 repositories have 2 branches, `git standup ... -B -n 1` will +display 6 commits at most. + ## EXAMPLES This shows your commits since yesterday: @@ -78,6 +92,20 @@ If current directory is not a git repo, git-standup will fetch data from all top 8e4182a - add watermark.png (7 days ago) 46fef1d - use tinyXML to configure (7 days ago) +By specifying the `-B` option, git-standuo will group the commits in branches: + + $ git standup -B -a spacewander -d 7 + + git-summary-cleanup + f788c78 - git-summary: clean up other shellcheck warnings (23 hours ago) + 3e8c3ab - git-summary: fix incorrect active days when commits range is given (23 hours ago) + ff991ac - git-summary: remove useless result function. (23 hours ago) + 203f5b4 - git-summary: add --dedup-by-email to remove duplicate users (5 days ago) + + master + 203f5b4 - git-summary: add --dedup-by-email to remove duplicate users (5 days ago) + +Note that the same commit can be seen in different branches. ## AUTHOR