git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Riesen <fork0@users.sourceforge.net>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/4] git-init-db should error out with a message
Date: Wed, 26 Oct 2005 22:47:27 +0200	[thread overview]
Message-ID: <20051026204727.GA19846@steel.home> (raw)
In-Reply-To: <7v3bmoc9d7.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano, Wed, Oct 26, 2005 22:27:00 +0200:
> > Not just that. It would be interesting to give the user an option to
> > use the file references ("ref: refs/heads/master").
> 
> Actually, the users should not have to care how HEAD reference
> is implemented.  It might make sense to use regular file symref
> regardless of platforms (i.e. never define USE_SYMLINK_HEAD on
> any platform).

This my idea too. All the time I was doing that patch :)

> HOWEVER, I think "falling back" (both in Johannes' patch which
> is in the "master" branch, and your version) has a funny failure
> mode.  What happens when two processes try redirecting .git/HEAD
> simultaneously, possibly to different branch heads?  Both of
> them unlink(), one successfully does symlink(), and the other
> gets EEXIST and falls back to create regular file symref.

I think the file ref version uses rename of HEAD.lock into HEAD, doesn't it?
Rename(2) should just remove the symlink, right?

  reply	other threads:[~2005-10-26 20:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-25 23:39 [PATCH 1/4] git-init-db should error out with a message Johannes Schindelin
2005-10-26 19:45 ` Alex Riesen
2005-10-26 20:27   ` Junio C Hamano
2005-10-26 20:47     ` Alex Riesen [this message]
2005-10-26 23:18       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051026204727.GA19846@steel.home \
    --to=fork0@users.sourceforge.net \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).