summaryrefslogtreecommitdiff
path: root/git-commit.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-10-02 18:47:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-10-02 18:48:06 (GMT)
commitc8f203255bc7a782e3a54e73d5801009bb7f0319 (patch)
tree1f5c3d243eb5e21a6de9147ce4ba5cabf2c1ac51 /git-commit.sh
parent63a1f810a6f976a307aaaabdce21082f6d7f20aa (diff)
downloadgit-c8f203255bc7a782e3a54e73d5801009bb7f0319.zip
git-c8f203255bc7a782e3a54e73d5801009bb7f0319.tar.gz
git-c8f203255bc7a782e3a54e73d5801009bb7f0319.tar.bz2
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>
Diffstat (limited to 'git-commit.sh')
-rwxr-xr-xgit-commit.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/git-commit.sh b/git-commit.sh
index 7a7a2cb..ab43217 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"