Skip to content

Commit 185612b

Browse files
author
Junio C Hamano
committed
Add -v option to git-cherry.
1 parent 46b1c7c commit 185612b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

git-cherry

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
. git-sh-setup-script || die "Not a git archive."
77

8-
usage="usage: $0 "'<upstream> [<head>]
8+
usage="usage: $0 "'[-v] <upstream> [<head>]
99
1010
__*__*__*__*__> <upstream>
1111
/
@@ -29,6 +29,8 @@ The output is intended to be used as:
2929
done
3030
'
3131

32+
case "$1" in -v) verbose=t; shift ;; esac
33+
3234
case "$#,$1" in
3335
1,*..*)
3436
upstream=$(expr "$1" : '\(.*\)\.\.') ours=$(expr "$1" : '.*\.\.\(.*\)$')
@@ -83,6 +85,10 @@ do
8385
else
8486
sign=+
8587
fi
88+
case "$verbose" in
89+
t)
90+
c=$(git-rev-list --pretty=oneline --max-count=1 $c)
91+
esac
8692
case "$O" in
8793
'') O="$sign $c" ;;
8894
*) O="$sign $c$LF$O" ;;

0 commit comments

Comments
 (0)