All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Avery Pennarun <apenwarr@gmail.com>
Cc: Jeff King <peff@peff.net>, 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 18:04:00 -0800	[thread overview]
Message-ID: <7vaav7wb8v.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <32541b131002171751n454081a9w90f2957d7a40d87@mail.gmail.com> (Avery Pennarun's message of "Wed\, 17 Feb 2010 20\:51\:27 -0500")

Avery Pennarun <apenwarr@gmail.com> writes:

>> ++
>> +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.

This is not about "I have packed refs/heads/master and then a loose
refs/heads/master also exists" case.  After packing, update ref simply
creates a new loose ref, and we read loose ones and give precedence to it
over packed one.  This is so that you once gc and most of the unchanging
refs will stay in packed file, but some active branches can be quickly
flipped without having to rewrite the whole packed refs file (or removing
the ref from that file).

But the statement is not about that.  The statement is about this:

    "refs/tags/master" gets higher precedence over "refs/heads/master",
    and this order is indifferent to where these two refs come from,
    either packed refs or loose in the filesystem.

  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 [this message]
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
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=7vaav7wb8v.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=apenwarr@gmail.com \
    --cc=arvidjaar@mail.ru \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --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.