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

Re: BUG: "cherry-pick A..B || git reset --hard OTHER"

From
Stephan Beyer <s-beyer@gmx.net>
Date
Dec 9, 2016, 19:24 UTC
Message-ID
<e0780f7c-ccb4-29fe-3d72-80e45a202f65@gmx.net>
In-Reply-To
<xmqq8trprn7f.fsf@gitster.mtv.corp.google.com>
Hi Junio,
On 12/09/2016 07:07 PM, Junio C Hamano wrote:
Show 10 quoted lines
> Duy Nguyen <pclouds@gmail.com> writes:
>> Having the same operation with different names only increases git
>> reputation of bad/inconsistent UI. Either forget is renamed to quit,
>> or vice versa. I prefer forget, but the decision is yours and the
>> community's. So I'm sending two patches to rename in either direction.
>> You can pick one.
> 
> I actually was advocating to remove both by making --abort saner.
> With an updated --abort that behaves saner, is "rebase --forget"
> still necessary?

A quick change in t3407 of the "rebase --forget" test to use "rebase --abort" failed. That's because it checks the use-case of forgetting/aborting without changing the HEAD. So --abort makes a rollback, --forget just keeps the current head. I am not sure if that tested use-case is a real use-case though.

A quick change in the pristine_detach function in t3510 and t3511 from "cherry-pick --quit" to "cherry-pick --abort" works when one ignores the return value of "cherry-pick --abort". The "--quit" is used here to ensure a clean cherry-pick state, and --quit always succeeds, even if no cherry-pick is in progress. That may be a real use-case somehow that could also be used for "rebase --forget"

t3510 also shows another use-case for --quit: the title says it all: "cherry-pick --quit" to "cherry-pick --abort"

With this additional information, I'd vote to keep --quit/--forget and just make it consistent.

~Stephan
Previous: Junio C HamanoNext: Stephan Beyer
Message 11 of 15 in “BUG: "cherry-pick A..B || git reset --hard OTHER"”
  1. Junio C HamanoDec 6, 2016
  2. Christian CouderDec 7, 2016
  3. Stephan BeyerDec 7, 2016
  4. Junio C HamanoDec 7, 2016
  5. Stephan BeyerDec 7, 2016
  6. Duy NguyenDec 7, 2016
  7. Duy NguyenDec 9, 2016
  8. rebase: rename --forget to be consistent with sequencerNguyễn Thái Ngọc Duy, Dec 9, 2016
  9. revert, cherry-pick: rename --quit to be consistent with rebaseNguyễn Thái Ngọc Duy, Dec 9, 2016
  10. Junio C HamanoDec 9, 2016
  11. Stephan BeyerDec 9, 2016
  12. Stephan BeyerDec 9, 2016
  13. Duy NguyenDec 10, 2016
  14. Junio C HamanoDec 10, 2016
  15. Christian CouderDec 8, 2016

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.