From c8f203255bc7a782e3a54e73d5801009bb7f0319 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 2 Oct 2007 11:47:58 -0700 Subject: [PATCH] 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 --- git-commit.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/git-commit.sh b/git-commit.sh index 7a7a2cb4b4..ab43217be4 100755 --- a/git-commit.sh +++ b/git-commit.sh @@ -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"