diff options
author | Junio C Hamano <junkio@cox.net> | 2005-08-09 23:58:35 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-08-10 00:00:22 -0700 |
commit | 185612b8d3562c82975b017c0c6e1d47dd302897 (patch) | |
tree | 7842bc517e44ddab2b721b93364e28c61e6c6a82 | |
parent | 46b1c7c03c3ae3bf17aa87bf9ae2f9fb38d08789 (diff) | |
download | git-185612b8d3562c82975b017c0c6e1d47dd302897.tar.gz git-185612b8d3562c82975b017c0c6e1d47dd302897.tar.xz |
Add -v option to git-cherry.
-rwxr-xr-x | git-cherry | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/git-cherry b/git-cherry index f14f017ef..e18636364 100755 --- a/git-cherry +++ b/git-cherry @@ -5,7 +5,7 @@ . git-sh-setup-script || die "Not a git archive." -usage="usage: $0 "'<upstream> [<head>] +usage="usage: $0 "'[-v] <upstream> [<head>] __*__*__*__*__> <upstream> / @@ -29,6 +29,8 @@ The output is intended to be used as: done ' +case "$1" in -v) verbose=t; shift ;; esac + case "$#,$1" in 1,*..*) upstream=$(expr "$1" : '\(.*\)\.\.') ours=$(expr "$1" : '.*\.\.\(.*\)$') @@ -83,6 +85,10 @@ do else sign=+ fi + case "$verbose" in + t) + c=$(git-rev-list --pretty=oneline --max-count=1 $c) + esac case "$O" in '') O="$sign $c" ;; *) O="$sign $c$LF$O" ;; |