@matheusbsbs / matheus-bagliano / commits / 1fa7a68f4b
Fork 0

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>

Yasushi SHOJI committed Mar 20, 2006 at 22:11 UTC 1fa7a68f4bf1d21bf6693f1d9a416b6a690efe52
1 file changed +1 -1
git-commit.sh
+1 -1
@@ -161,7 +161,7 @@ run_status () {
161 }
162 '
163
164 - if test -n "$verbose"
164 + if test -n "$verbose" -a -z "$IS_INITIAL"
165 then
166 git-diff-index --cached -M -p --diff-filter=MDTCRA $REFERENCE
167 fi