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

Re: [PATCH v2] git-rebase: Teach rebase "-" shorthand.

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 19, 2014, 21:02 UTC
Message-ID
<xmqq7g7p3nrl.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20140319195503.GD11018@serenity.lan>
John Keeping <john@keeping.me.uk> writes:
Show 18 quoted lines
>> I thought your suggestion was:
>> 
>>     'rebase @{-1}' says 'Fast-fowarded HEAD to @{-1}'. It should say
>>     'Fast-forwarded HEAD to 4f407407 (rebase: allow "-" short-hand
>>     for the previous branch, 2014-03-19)' instead.
>> 
>> Or it could be:
>> 
>>     'rebase @{-1}' says 'Fast-fowarded HEAD to @{-1}'. It should say
>>     'Fast-forwarded HEAD to master' instead.
>> 
>> In either case, it does not look like such a change is about
>> teaching "-" as a synonym to "@{-1}".
>
> My suggestion was specifically:
>
>     'rebase -' says 'Fast-forwarded HEAD to -'.  It should say
>     'Fast-forwarded HEAD to master' instead.
OK, it was closer to the latter.

But why is it OK to leave @{-1}, which is just as "hmm, I do not remember what the previous branch was myself" when the user says "@{-1}" in the output while it not OK to leave "-" in the output?

I do not think of any sane reason, and that is why I think this improvement is not part of "teaching rebase that '-' can be used in place of @{-1}" topic.

Previous: John Keeping
Message 12 of 12 in “git-rebase: Teach rebase "-" shorthand.”
  1. git-rebase: Teach rebase "-" shorthand.Brian Gesiak, Mar 18, 2014
  2. Torsten BögershausenMar 18, 2014
  3. Junio C HamanoMar 18, 2014
  4. git-rebase: Teach rebase "-" shorthand.Brian Gesiak, Mar 19, 2014
  5. Junio C HamanoMar 19, 2014
  6. John KeepingMar 19, 2014
  7. Brian GesiakMar 19, 2014
  8. Junio C HamanoMar 19, 2014
  9. John KeepingMar 19, 2014
  10. Junio C HamanoMar 19, 2014
  11. John KeepingMar 19, 2014
  12. Junio C HamanoMar 19, 2014

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.