@matheusbsbs / matheus-bagliano / commits / c8f203255b
Fork 0

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>

Junio C Hamano committed Oct 2, 2007 at 11:47 UTC c8f203255bc7a782e3a54e73d5801009bb7f0319
1 file changed +1
git-commit.sh
+1
@@ -25,6 +25,7 @@ refuse_partial () {
25 exit 1
26 }
27
28 +TMP_INDEX=
29 THIS_INDEX="$GIT_DIR/index"
30 NEXT_INDEX="$GIT_DIR/next-index$$"
31 rm -f "$NEXT_INDEX"