aboutsummaryrefslogtreecommitdiff
path: root/git-commit.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-commit.sh')
-rwxr-xr-xgit-commit.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-commit.sh b/git-commit.sh
index 41538f16e..5ea3fd007 100755
--- a/git-commit.sh
+++ b/git-commit.sh
@@ -379,8 +379,11 @@ t,)
then
refuse_partial "Cannot do a partial commit during a merge."
fi
+
TMP_INDEX="$GIT_DIR/tmp-index$$"
- commit_only=`git ls-files --error-unmatch -- "$@"` || exit
+ W=
+ test -z "$initial_commit" && W=--with-tree=HEAD
+ commit_only=`git ls-files --error-unmatch $W -- "$@"` || exit
# Build a temporary index and update the real index
# the same way.