make commit message a little more consistent and conforting
It is nicer to let the user know when a commit succeeded all the time, not only the first time. Also the commit sha1 is much more useful than the tree sha1 in this case. This patch also introduces a -q switch to supress this message as well as the summary of created/deleted files. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:

committed by
Junio C Hamano

parent
1510fea781
commit
ebd124c678
@ -80,6 +80,7 @@ no_edit=
|
||||
log_given=
|
||||
log_message=
|
||||
verify=t
|
||||
quiet=
|
||||
verbose=
|
||||
signoff=
|
||||
force_author=
|
||||
@ -241,6 +242,10 @@ $1"
|
||||
signoff=t
|
||||
shift
|
||||
;;
|
||||
-q|--q|--qu|--qui|--quie|--quiet)
|
||||
quiet=t
|
||||
shift
|
||||
;;
|
||||
-v|--v|--ve|--ver|--verb|--verbo|--verbos|--verbose)
|
||||
verbose=t
|
||||
shift
|
||||
@ -615,11 +620,17 @@ then
|
||||
git-rerere
|
||||
fi
|
||||
|
||||
if test -x "$GIT_DIR"/hooks/post-commit && test "$ret" = 0
|
||||
if test "$ret" = 0
|
||||
then
|
||||
"$GIT_DIR"/hooks/post-commit
|
||||
if test -x "$GIT_DIR"/hooks/post-commit
|
||||
then
|
||||
"$GIT_DIR"/hooks/post-commit
|
||||
fi
|
||||
if test -z "$quiet"
|
||||
then
|
||||
echo "Created${initial_commit:+ initial} commit $commit"
|
||||
git-diff-tree --shortstat --summary --root --no-commit-id HEAD
|
||||
fi
|
||||
fi
|
||||
|
||||
test "$ret" = 0 && git-diff-tree --summary --root --no-commit-id HEAD
|
||||
|
||||
exit "$ret"
|
||||
|
Reference in New Issue
Block a user