From 185612b8d3562c82975b017c0c6e1d47dd302897 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 9 Aug 2005 23:58:35 -0700 Subject: [PATCH] Add -v option to git-cherry. --- git-cherry | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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" ;; -- 2.26.2