git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Make GIT_INDEX_FILE apply to git-commit

From
Remi Vanicat <vanicat@debian.org>
Date
Nov 10, 2007, 10:00 UTC
Message-ID
<87abpml8rx.dlv@vanicat.homelinux.org>

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>
---
 git-commit.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-commit.sh b/git-commit.sh
index fcb8443..6490045 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 () {
--
1.5.3.5
Next: Junio C Hamano
Message 1 of 4 in “Make GIT_INDEX_FILE apply to git-commit”
  1. Make GIT_INDEX_FILE apply to git-commitRemi Vanicat, Nov 10, 2007
  2. Junio C HamanoNov 10, 2007
  3. Remi VanicatNov 10, 2007
  4. Junio C HamanoNov 10, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.