Re: [PATCH] git-reset.txt: Use commit~1 notation over commit^

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

 



On Wed, Dec 1, 2010 at 11:06 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Jari Aalto <jari.aalto@xxxxxxxxx> writes:
>
>> What people appreciate, while learning, is constency. Sticking to one
>> notation is better than giving multiple choices. And the "^" isn't
>> exactly readable, don't you agree?
>>
>>     HEAD^^^^^^^^
>>
>> Right. How many was there again?
>
> There is no question that you need to really count them, and that is why
> we invented HEAD~8 notation in the first place.  It however is wrong to
> use the above illustration to defend your change that replaces "HEAD^"
> with "HEAD~1".
>
> The thing is, you need to name/call the previous one a lot more often than
> you need to call the eighth previous one.  The previous one "HEAD~1" is
> special because it directly relates to the current commit (it is the first
> parent of the current commit) and that is why people often need to access
> it.

Additionaly, you must know about the ^ notation. That is the only way
refer to the second parent HEAD^2, for example.

HTH,
Santi
--
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]