Re: Host refs to push are chosen (documentation error)?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Avery Pennarun <apenwarr@xxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]