summaryrefslogtreecommitdiff
path: root/git-commit.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-commit.sh')
-rwxr-xr-xgit-commit.sh19
1 files changed, 15 insertions, 4 deletions
diff --git a/git-commit.sh b/git-commit.sh
index 05828bb..a30bda1 100755
--- a/git-commit.sh
+++ b/git-commit.sh
@@ -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"