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

[PATCH] Fix git-update-index --again

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Sep 21, 2006, 21:29 UTC
Message-ID
<Pine.LNX.4.63.0609212329310.19042@wbgn013.biozentrum.uni-wuerzburg.de>

It called read_ref(git_path(..)..), where read_ref does the git_path() stuff itself.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 builtin-update-index.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/builtin-update-index.c b/builtin-update-index.c
index 0620e77..09214c8 100644
--- a/builtin-update-index.c
+++ b/builtin-update-index.c
@@ -404,9 +404,9 @@ static int unresolve_one(const char *pat
 
 static void read_head_pointers(void)
 {
-	if (read_ref(git_path("HEAD"), head_sha1))
+	if (read_ref("HEAD", head_sha1))
 		die("No HEAD -- no initial commit yet?\n");
-	if (read_ref(git_path("MERGE_HEAD"), merge_head_sha1)) {
+	if (read_ref("MERGE_HEAD", merge_head_sha1)) {
 		fprintf(stderr, "Not in the middle of a merge.\n");
 		exit(0);
 	}
@@ -443,7 +443,7 @@ static int do_reupdate(int ac, const cha
 	int has_head = 1;
 	const char **pathspec = get_pathspec(prefix, av + 1);
 
-	if (read_ref(git_path("HEAD"), head_sha1))
+	if (read_ref("HEAD", head_sha1))
 		/* If there is no HEAD, that means it is an initial
 		 * commit.  Update everything in the index.
 		 */
-- 
1.4.2.1.ge488
Message 1 of 1 in “Fix git-update-index --again”
  1. Fix git-update-index --againJohannes Schindelin, Sep 21, 2006

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.