summaryrefslogtreecommitdiff
path: root/git-commit.sh
diff options
context:
space:
mode:
authorYasushi SHOJI <yashi@atmark-techno.com>2006-03-20 22:11:12 +0900
committerJunio C Hamano <junkio@cox.net>2006-03-20 14:37:59 -0800
commit1fa7a68f4bf1d21bf6693f1d9a416b6a690efe52 (patch)
treec2489c5e7263ea884f5fd18b141607c45d4cfdf2 /git-commit.sh
parent3070b603ab349674fd357b1b7f9ba4698f2b86b7 (diff)
downloadgit-1fa7a68f4bf1d21bf6693f1d9a416b6a690efe52.tar.gz
Be verbose when !initial commit
verbose option in git-commit.sh lead us to run git-diff-index, which needs a commit-ish we are making diff against. When we are commiting the fist set, we obviously don't have any commit-ish in the repo. So we just skip the git-diff-index run. It might be possible to produce diff against empty but do we need that? Signed-off-by: Yasushi SHOJI <yashi@atmark-techno.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-commit.sh')
-rwxr-xr-xgit-commit.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-commit.sh b/git-commit.sh
index 330a434b18..1e7c09e1f2 100755
--- a/git-commit.sh
+++ b/git-commit.sh
@@ -161,7 +161,7 @@ run_status () {
}
'
- if test -n "$verbose"
+ if test -n "$verbose" -a -z "$IS_INITIAL"
then
git-diff-index --cached -M -p --diff-filter=MDTCRA $REFERENCE
fi