From: Junio C Hamano Date: Mon, 16 Apr 2007 05:16:24 GMT Subject: Re: [PATCH] display the subject of the commit just made Message-ID: <7vwt0cx5jr.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <20070416035325.GA20304@mellanox.co.il> "Michael S. Tsirkin" writes: > Better? > > diff --git a/git-commit.sh b/git-commit.sh > index 9e0959a..32257b0 100755 > --- a/git-commit.sh > +++ b/git-commit.sh > @@ -649,8 +649,9 @@ then > fi > if test -z "$quiet" > then > + commit=`git-diff-tree --shortstat --pretty="format:%h: %s"\ > + --summary --root HEAD --` > echo "Created${initial_commit:+ initial} commit $commit" > - git-diff-tree --shortstat --summary --root --no-commit-id HEAD -- > fi > fi Close but no cigar. You broke it for a merge commit, I think. Perhaps pretty="format:Created${initial_commit:+ initial} commit %h: %s%n" git-diff-tree --always --shortstart --summary --root --pretty="$pretty" HEAD