git-commit: initialize TMP_INDEX just to be sure.

We rely on TMP_INDEX variable to decide if we are doing a partial commit,
as it is only set in the partial commit codepath.  But the variable is
never initialized.  A stray environment variable from outside could
ruin the day.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano 2007-10-02 11:47:58 -07:00
parent 63a1f810a6
commit c8f203255b

View File

@ -25,6 +25,7 @@ refuse_partial () {
exit 1
}
TMP_INDEX=
THIS_INDEX="$GIT_DIR/index"
NEXT_INDEX="$GIT_DIR/next-index$$"
rm -f "$NEXT_INDEX"