Re: [PATCH] describe: output tag's ref instead of embedded name

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

 



Jeff King <peff@xxxxxxxx> writes:

>> FWIW, this design came from 212945d4 ("Teach git-describe to verify
>> annotated tag names before output", 2008-02-28).  Shawn was quite
>> explicit that use of the real name was deliberate:
>> 
>>     If an annotated tag describes a commit we want to favor the name
>>     listed in the body of the tag, rather than whatever name it has
>>     been stored under locally.  By doing so it is easier to converse
>>     about tags with others, even if the tags happen to be fetched to
>>     a different name than it was given by its creator.
>> 
>> and I tend to agree with the original rationale.
>
> Thanks, I should have dug into the history in the first place.
>
> Still, I'm not entirely convinced. As a decentralized system, I think
> our first duty is to make things convenient and workable for the
> preferences of the local repository, and second to facilitate
> communication with other people's clones of the same repository.

Yes, and that can be done by either (1) locally moving a tag that is
stored in a wrong location to where it wants to be, or (2) locally
*creating* a tag that suits the preferences of the local repository,
ignoring the tag obtained from outside world that is stored in a
wrong place.  The latter would not help to facilitate communication,
though.

> If for whatever reason I chose to call my version of the global v1.0 tag
> as "v1.0-bob", then it seems friendlier to me to report the name that
> can actually be used with further local commands (and remind the user of
> the global name) than the other way around.

That you can do with "git tag v1.0-bob <whatever object>" locally, no?

> Though TBH the situation is rare enough that I kind of doubt it matters
> all that much either way. It's been like this for over a decade, and
> this is the first time I recall it being brought up.

Yeah, I do not think this is an often-arising concern.  It's merely
what the expected and recommended direction to escape when it
happens, and what the warning message should say to make the
recommendation communicated better, I think.

Note that I started this to play a devil's advocate.  As an object
is immutable, while it can be named with any refname, if easing
communication between project participants is one of the goals, it
seems that taking what is in the object as authoritative is the only
workable way.




[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]

  Powered by Linux