summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-08-09 23:58:35 -0700
committerJunio C Hamano <junkio@cox.net>2005-08-10 00:00:22 -0700
commit185612b8d3562c82975b017c0c6e1d47dd302897 (patch)
tree7842bc517e44ddab2b721b93364e28c61e6c6a82
parent46b1c7c03c3ae3bf17aa87bf9ae2f9fb38d08789 (diff)
downloadgit-185612b8d3562c82975b017c0c6e1d47dd302897.tar.gz
Add -v option to git-cherry.
-rwxr-xr-xgit-cherry8
1 files changed, 7 insertions, 1 deletions
diff --git a/git-cherry b/git-cherry
index f14f017efe..e186363647 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" ;;