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>
This commit is contained in:
Yasushi SHOJI 2006-03-20 22:11:12 +09:00 committed by Junio C Hamano
parent 3070b603ab
commit 1fa7a68f4b

View file

@ -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