Re: [PATCH] More precise description of 'git describe --abbrev'

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

 



Gisle Aas <gisle@xxxxxx> writes:

> On Thu, Oct 29, 2009 at 23:47, Junio C Hamano <gitster@xxxxxxxxx> wrote:
>> Gisle Aas <gisle@xxxxxx> writes:
>>
>>> Also make the examples show what 'git describe' actually outputs
>>> currently.  I guess the default --abbrev value has been changed from 4
>>> to 7 at some point.
>>
>> Some are good changes, but I do not think the example with --abbrev=4 is.
>>
>> $ git describe 975bf9cf5ad5d440f98f464ae8124609a4835ce1
>> v1.3.2-216-g975bf9c
>> $ git describe 975b31dc6e12fba8f7b067ddbe32230995e05400
>> v1.0.0-21-g975b31d
>>
>> Next time somebody adds a new object whose name happens to begin with
>> 975b3 you would need to update the example output.
>
> Yeah, I know, but I don't think that's a big deal.  So do you want an
> updated patch for that?  We could either simply remove this example or
> make it use --abbrev=10 or something like that.

Not touching the example would be the simplest.

Adding an explanation like this so that nobody will be tempted to "fix"
the example would be the best, I think.

     [torvalds@g5 git]$ git describe --all --abbrev=4 v1.0.5^2
     tags/v1.0.0-21-g975b

     Note that the suffix you get if you type this command today may be
     longer than what Linus saw above when he ran this command, as your
     git repository may have new commits whose object names begin with
     975b that did not exist back then, and "-g975b" suffix alone is not
     sufficient to disambiguate these commits.

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