From: Junio C Hamano Date: Wed, 25 Oct 2006 04:48:55 +0000 (-0700) Subject: git-commit: show --summary after successful commit. X-Git-Tag: v1.5.0-rc0~122^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=61f5cb7f0d9ea6990f331bd7082630691c88abd2;p=git.git git-commit: show --summary after successful commit. Sometimes people accidentally commit files in wrong mode bits. Show --summary output for the HEAD commit after successful commit as a final sanity check. Signed-off-by: Junio C Hamano --- diff --git a/Documentation/tutorial-2.txt b/Documentation/tutorial-2.txt index 42b6e7d7d..6389de5ef 100644 --- a/Documentation/tutorial-2.txt +++ b/Documentation/tutorial-2.txt @@ -23,6 +23,7 @@ $ echo 'hello world' > file.txt $ git add . $ git commit -a -m "initial commit" Committing initial tree 92b8b694ffb1675e5975148e1121810081dbdffe + create mode 100644 file.txt $ echo 'hello world!' >file.txt $ git commit -a -m "add emphasis" ------------------------------------------------ diff --git a/git-commit.sh b/git-commit.sh index 81c3a0cb6..7e9742d5e 100755 --- a/git-commit.sh +++ b/git-commit.sh @@ -629,4 +629,7 @@ if test -x "$GIT_DIR"/hooks/post-commit && test "$ret" = 0 then "$GIT_DIR"/hooks/post-commit fi + +test "$ret" = 0 && git-diff-tree --summary --root --no-commit-id HEAD + exit "$ret"