git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Documentation/git-reset.txt: Use HEAD~N syntax everywhere (unify examples)

From
Jakub Narebski <jnareb@gmail.com>
Date
Feb 4, 2008, 00:28 UTC
Message-ID
<m3hcgp5zvs.fsf@localhost.localdomain>
In-Reply-To
<bq6x38lc.fsf@blue.sea.net>
Jari Aalto <jari.aalto@cante.net> writes:
Show 5 quoted lines
> * Sun 2008-02-03 Dmitry Potapov <dpotapov@gmail.com>
> * Message-Id: 20080203193024.GV29522@dpotapov.dyndns.org
>>
>> ^-syntax is very natural to specify the _previous_ commit. Have you
>> notice we usually say "previous", not "one commit before"?

And you usually say "yesterday", "the day before" and not "1 day ago", "2 days ago".

<rev>^ means (first) parent of commit-ish <rev>, or 'previous' commit. <rev>~N means Nth parent in first-parent line of commit-ish <rev>; as you can see full explanation is decidely longer.

> Only if you're grown with git. Everywhere else the concept of HEAD or
> TIP is more natural, thus progression:
> 
>     HEAD, HEAD~1, HEAD~2

The fact that other SCMs are poorer in expressive power doesn't mean that we have to bend backwards and follow (well, not braindamaged, just poor) other SCM limitations / conventions. Git is git is git :-)

So "everywhere else" doesn't matter any... unless in "SCM rosetta" or something like that chapter in Git User's Manual.

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Jari AaltoNext: Dmitry Potapov
Message 15 of 16 in “Documentation/git-reset.txt: Use HEAD~N syntax everywhere (unify examples)”
  1. Documentation/git-reset.txt: Use HEAD~N syntax everywhere (unify examples)Jari Aalto, Feb 2, 2008
  2. Johannes SchindelinFeb 2, 2008
  3. Junio C HamanoFeb 2, 2008
  4. Mike HommeyFeb 2, 2008
  5. Jari AaltoFeb 2, 2008
  6. Jakub NarebskiFeb 2, 2008
  7. Jari AaltoFeb 2, 2008
  8. Johannes SchindelinFeb 3, 2008
  9. J. Bruce FieldsFeb 2, 2008
  10. Jari AaltoFeb 2, 2008
  11. Robin RosenbergFeb 2, 2008
  12. Junio C HamanoFeb 2, 2008
  13. Dmitry PotapovFeb 3, 2008
  14. Jari AaltoFeb 3, 2008
  15. Jakub NarebskiFeb 4, 2008
  16. Dmitry PotapovFeb 4, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.