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.