[PATCH] display the subject of the commit just made
- From
- Michael S. Tsirkin <mst@dev.mellanox.co.il>
- Date
- Apr 16, 2007, 03:53 UTC
- Message-ID
- <20070416035325.GA20304@mellanox.co.il>
- In-Reply-To
- <7vy7kt1bij.fsf@assigned-by-dhcp.cox.net>
Useful e.g. to figure out what I did from screen history, or to make sure subject line is short enough and makes sense on its own.
Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
---
> WHY? You just made the commit.
Hopefully answered above. This also gets rid of the only user of --no-commit-id, so we should be able to deprecate this in the future in favor of --pretty=format:
Show 20 quoted lines
> >> Quoting Junio C Hamano <junkio@cox.net>: > >> Subject: Re: [PATCH] display shortlog after git-commit > >> > >> Too noisy for a default. > > > > So maybe the following isn't too bad? > > This results in: > > $ ./git-commit.sh --amend > > Created commit 5633ddde0e35210f607bde063bcbf709e4d20a8d > > Display the subject of the commit just made. > > 1 files changed, 1 insertions(+), 1 deletions(-) > > I think this is still one line too many. It _might_ be an > improvement if it were > > $ ./git-commit.sh --amend > Created commit 5633ddde: Display the subject of the commit just made. > 1 files changed, 1 insertions(+), 1 deletions(-) > > though...
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
-- MST