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

Re: What's in git.git (stable frozen)

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
Jan 17, 2008, 17:17 UTC
Message-ID
<478F8D9B.5080703@nrlssc.navy.mil>
In-Reply-To
<7vk5m9kvf7.fsf@gitster.siamese.dyndns.org>
In lockfile.c:commit_locked_index()

You didn't include the portion of your patch that assigned NULL to alternate_index_output before attempting to close and rename.

Should that be included?
-brandon
Junio C Hamano wrote:
@@ -185,9 +198,15 @@ void set_alternate_index_output(const char *name)
 int commit_locked_index(struct lock_file *lk)
 {
 	if (alternate_index_output) {
-		int result = rename(lk->filename, alternate_index_output);
-		lk->filename[0] = 0;
-		return result;
+		const char *newname = alternate_index_output;
+		alternate_index_output = NULL;
Previous: Shawn O. PearceNext: Junio C Hamano
Message 6 of 8 in “What's in git.git (stable frozen)”
  1. Junio C HamanoJan 17, 2008
  2. Johannes SixtJan 17, 2008
  3. fast-import.c: don't try to commit marks file if write failedBrandon Casey, Jan 17, 2008
  4. Junio C HamanoJan 17, 2008
  5. Shawn O. PearceJan 18, 2008
  6. Brandon CaseyJan 17, 2008
  7. Junio C HamanoJan 17, 2008
  8. Shawn O. PearceJan 18, 2008

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.