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

Re: [PATCH 1/4] git-init-db should error out with a message

From
Junio C Hamano <junkio@cox.net>
Date
Oct 26, 2005, 23:18 UTC
Message-ID
<7vhdb3c1fb.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20051026204727.GA19846@steel.home>
Alex Riesen <fork0@users.sourceforge.net> writes:
> I think the file ref version uses rename of HEAD.lock into HEAD, doesn't it?
> Rename(2) should just remove the symlink, right?

If everybody used symlink or if everybody used regular file symref, we would catch this race and the second one will be stopped. My point was that by falling back we are introducing this unnecessary race, which might be unimportant but still it is a new race.

To avoid that, I think symlink version needs to honor the HEAD.lock convention, which would slow down normal cases.

Previous: Alex Riesen
Message 5 of 5 in “git-init-db should error out with a message”
  1. 1/4 git-init-db should error out with a messageJohannes Schindelin, Oct 25, 2005
  2. Alex RiesenOct 26, 2005
  3. Junio C HamanoOct 26, 2005
  4. Alex RiesenOct 26, 2005
  5. Junio C HamanoOct 26, 2005

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.