All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Avery Pennarun <apenwarr@gmail.com>
Cc: Tay Ray Chuan <rctay89@gmail.com>,
	Andrey Borzenkov <arvidjaar@mail.ru>,
	git@vger.kernel.org
Subject: Re: Host refs to push are chosen (documentation error)?
Date: Wed, 17 Feb 2010 21:04:09 -0500	[thread overview]
Message-ID: <20100218020409.GA20960@coredump.intra.peff.net> (raw)
In-Reply-To: <32541b131002171751n454081a9w90f2957d7a40d87@mail.gmail.com>

On Wed, Feb 17, 2010 at 08:51:27PM -0500, Avery Pennarun wrote:

> On Wed, Feb 17, 2010 at 8:16 PM, Jeff King <peff@peff.net> wrote:
> > Agreed. It's a minor point, but one that can mislead users who don't
> > know about packed refs. Maybe something like this?
> 
> Wow, you really go all out.  Looks pretty good to me, except maybe this:

Well, if we're going to spend the mental energy to change one spot, we
may as well grep and change them all. :)

> > ++
> > +For any of the `$GIT_DIR/refs` cases above, packed refs from
> > +`$GIT_DIR/packed-refs` may be substituted (e.g., a line with
> > +`refs/heads/master` in the packed-refs file would have the same
> > +precedence as the file `$GIT_DIR/refs/heads/master`).
> 
> Are they really equal precedence?  How does git decide, when there's
> one of each?  I'd guess packed-refs might actually be strictly higher
> precedence, but I'm not sure.

No, packed refs are just below actual ref files in precedence, because
any writes since the pack will be in the actual ref file. What I meant
by "same precedence" was that a packed ref behaves in the lookup
precedence "as if" its ref file existed.

Perhaps it should read:

  (e.g., a line with `refs/heads/master` in the packed-refs file would
  have precedence just below `$GIT_DIR/refs/heads/master` but above
  `$GIT_DIR/refs/remotes/master`)

but that is really conflating two types of precedence (packed refs
versus ref files, and fully-qualifying ref names). They do form a strict
ordering when combined, but that does not necessarily mean that is the
best way for users to understand what is happening.

Maybe that section should also just lose the $GIT_DIR/ from all of the
refs examples, and then we should note later that they may come from
$GIT_DIR or from packed-refs.

-Peff

  parent reply	other threads:[~2010-02-18  2:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-17 13:27 Host refs to push are chosen (documentation error)? Andrey Borzenkov
2010-02-17 13:39 ` Tay Ray Chuan
2010-02-17 17:39   ` Avery Pennarun
2010-02-18  1:16     ` Jeff King
2010-02-18  1:51       ` Avery Pennarun
2010-02-18  2:04         ` Junio C Hamano
2010-02-18  2:10           ` Jeff King
2010-02-18  4:06             ` Junio C Hamano
2010-02-18  4:43               ` Jeff King
2010-02-18  5:13                 ` Junio C Hamano
2010-02-18  2:04         ` Jeff King [this message]
2010-02-18  7:19       ` Andrey Borzenkov

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=20100218020409.GA20960@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=apenwarr@gmail.com \
    --cc=arvidjaar@mail.ru \
    --cc=git@vger.kernel.org \
    --cc=rctay89@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.