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

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

 



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.

And "HEAD^" is shorter and much easier to type, and more importantly, it
is more often used in the wild, so the readers of the documentation needs
to know it anyway to understand what other people do.
--
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]