From: Yasushi SHOJI Date: Mon, 20 Mar 2006 13:11:12 +0000 (+0900) Subject: Be verbose when !initial commit X-Git-Tag: v1.3.0-rc1~9^2~7 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=1fa7a68f4bf1d21bf6693f1d9a416b6a690efe52;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/git-commit.sh b/git-commit.sh index 330a434b..1e7c09e1 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