git-commit: partial commit of paths only removed from the index

Because a partial commit is meant to be a way to ignore what are
staged in the index, "git rm --cached A && git commit A" should
just record what is in A on the filesystem.  The previous patch
made the command sequence to barf, saying that A has not been
added yet.  This fixes it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano
2007-09-14 16:53:58 -07:00
parent 80bffaf7fb
commit db33af0a7f
2 changed files with 14 additions and 3 deletions

View File

@ -404,7 +404,7 @@ t,)
(
GIT_INDEX_FILE="$NEXT_INDEX"
export GIT_INDEX_FILE
git update-index --remove --stdin
git update-index --add --remove --stdin
) || exit
;;
esac