diff options
Diffstat (limited to 'git-commit.sh')
-rwxr-xr-x | git-commit.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/git-commit.sh b/git-commit.sh index 41538f16e5..5ea3fd0076 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. |