Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git-commit: initialize TMP_INDEX just to be sure.
author
Junio C Hamano
<gitster@pobox.com>
Tue, 2 Oct 2007 18:47:58 +0000
(11:47 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 2 Oct 2007 18:48:06 +0000
(11:48 -0700)
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>
git-commit.sh
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
63a1f81
)
diff --git
a/git-commit.sh
b/git-commit.sh
index 7a7a2cb4b47c62d4826aabd9d90a7af26427f980..ab43217be4b49ce71ffee461569e0e4b395dfb5d 100755
(executable)
--- 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"