summaryrefslogtreecommitdiff
path: root/git-commit.sh
diff options
context:
space:
mode:
authorRémi Vanicat <vanicat@debian.org>2007-11-11 12:28:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-11-11 23:41:07 (GMT)
commit859a4dbcadd200ae955fe36d0c4fb3f4bce0e032 (patch)
treebabf63124993a1254f51f68b1ec521e2543559ed /git-commit.sh
parenta91ef6e75b897a255cc17b70014a39e68dd54c7a (diff)
downloadgit-859a4dbcadd200ae955fe36d0c4fb3f4bce0e032.zip
git-859a4dbcadd200ae955fe36d0c4fb3f4bce0e032.tar.gz
git-859a4dbcadd200ae955fe36d0c4fb3f4bce0e032.tar.bz2
Make GIT_INDEX_FILE apply to git-commit
Currently, when committing, git-commit ignore the value of GIT_INDEX_FILE, and always use $GIT_DIR/index. This patch fix it. Signed-off-by: Rémi Vanicat <vanicat@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-commit.sh')
-rwxr-xr-xgit-commit.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-commit.sh b/git-commit.sh
index ab43217..fdaa019 100755
--- a/git-commit.sh
+++ b/git-commit.sh
@@ -26,7 +26,7 @@ refuse_partial () {
}
TMP_INDEX=
-THIS_INDEX="$GIT_DIR/index"
+THIS_INDEX="${GIT_INDEX_FILE:-$GIT_DIR/index}"
NEXT_INDEX="$GIT_DIR/next-index$$"
rm -f "$NEXT_INDEX"
save_index () {