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

Re: [PATCH 2/2] Document rev^! and rev^@ as revision specifiers

From
Max Horn <max@quendi.de>
Date
Jul 9, 2012, 15:02 UTC
Message-ID
<05708C97-7925-4E45-BA16-374FB38F54D1@quendi.de>
In-Reply-To
<7vliiwog0a.fsf@alter.siamese.dyndns.org>
> 
On 06.07.2012, at 21:18, Junio C Hamano wrote:
Show 17 quoted lines
> Max Horn <max@quendi.de> writes:
> 
>>>> +'<rev>{caret}!', e.g. 'HEAD{caret}!'::
>>>> +  A suffix '{caret}' followed by an exclamation mark
>>>> +  means commit '<rev>' but forces all of its parents to be excluded. For
>>>> +  commands that deal with a single revision, this is the same as '<rev>".
>>> 
>>> Is this sentence correct?  "git commit -C 'HEAD^!'" might be a
>>> command that expects a single revision, but I do not think it is the
>>> same as "git commit -C HEAD".
>> 
>> Ignoring the exact words I used for the moment, what I meant is that these two commands should be functionally equivalent. Aren't they?
> 
> No.  When a single commit is wanted HEAD^! shouldn't be used, and
> they cannot be functionally equivalent.  I haven't tried but I think
> "commit -C HEAD^!"  would give you a syntax error.
> 
Indeed, it says
 fatal: could not lookup commit HEAD^!
I'll iterate over this once more.

Cheers, Max

Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 9 in “Improve revisions.txt”
  1. Improve revisions.txtMax Horn, Jul 5, 2012
  2. Junio C HamanoJul 5, 2012
  3. 1/2 Make <refname> documentation more consistent.Max Horn, Jul 6, 2012
  4. 2/2 Document rev^! and rev^@ as revision specifiersMax Horn, Jul 6, 2012
  5. Junio C HamanoJul 6, 2012
  6. Max HornJul 6, 2012
  7. Junio C HamanoJul 6, 2012
  8. Max HornJul 9, 2012
  9. Junio C HamanoJul 23, 2012

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.