From: Junio C Hamano Date: Wed, 10 Aug 2005 06:58:35 +0000 (-0700) Subject: Add -v option to git-cherry. X-Git-Tag: v0.99.4~3^2~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=185612b8d3562c82975b017c0c6e1d47dd302897;p=git.git Add -v option to git-cherry. --- 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 "' [] +usage="usage: $0 "'[-v] [] __*__*__*__*__> / @@ -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" ;;