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

Re: [PATCH v2 1/2] [GSOC] cherry-pick: fix bug when used with GIT_CHERRY_PICK_HELP

From
ZheNing Hu <adlternative@gmail.com>
Date
Aug 4, 2021, 08:35 UTC
Message-ID
<CAOLTT8SkbNMcVocU9Lg3PfqTGHVEX8y27BMcP55HytfWH60w6g@mail.gmail.com>
In-Reply-To
<xmqqa6lytat9.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> 于2021年8月4日周三 上午6:36写道:
>
Show 16 quoted lines
> > GIT_CHERRY_PICK_HELP value in run_specific_rebase().
>
> "help realize the rebasing steps" did not tell us much on "how" the
> environment variable helps or what it is used for.  A sentence at
> this point, e.g.
>
>     The variable carries a custom help message to be shown when one
>     step of replaying an existing commit fails in conflict.
>
> may help.  And there is one leap in the logic flow here.
>
>     However, the code also removes CHERRY_PICK_HEAD pseudoref when
>     this environment variable exists, assuming that the presence of
>     it means the sequencer machinery and not end-user is doing the
>     cherry-picking.
>
Thanks, such a supplement is very good.
Show 8 quoted lines
> Hmph, this is a bit troubling.  So has this been part of the
> "published" behaviour since d7e5c0cb (Introduce CHERRY_PICK_HEAD,
> 2011-02-19) that introduced this test, and there are people who are
> relying on it?  IOW, should the resolution to the original problem
> report have been "if it hurts, don't do it" (in other words, "setting
> GIT_CHERRY_PICK_HELP will remove CHERRY_PICK_HEAD, so if you do not
> want to get the latter removed, do not set the former")?
>

You mean that cherry_pick with GIT_CHERRY_PICK_HELP suppresses CHERRY_PICK_HEAD is not even a bug?

It is reasonable for `git rebase -p` and `git rebase -m` to delete CHERRY_PICK_HEAD when a conflict occurs, but it is not necessarily for git cherry-pick to delete it too. IOW, I suspect that instead of letting users not touch the trap here, it is better to remove the trap completely.

Thanks. -- ZheNing Hu

Previous: Junio C HamanoNext: Phillip Wood
Message 11 of 32 in “[GSOC] cherry-pick: fix bug when used with GIT_CHERRY_PICK_HELP”
  1. 0/2 [GSOC] cherry-pick: fix bug when used with GIT_CHERRY_PICK_HELPZheNing Hu via GitGitGadget, Jul 31, 2021
  2. 2/2 [GSOC] cherry-pick: use better advice messageZheNing Hu via GitGitGadget, Jul 31, 2021
  3. Phillip WoodAug 1, 2021
  4. ZheNing HuAug 2, 2021
  5. 1/2 [GSOC] cherry-pick: fix bug when used with GIT_CHERRY_PICK_HELPZheNing Hu via GitGitGadget, Jul 31, 2021
  6. Phillip WoodAug 1, 2021
  7. ZheNing HuAug 2, 2021
  8. 0/2 [GSOC] cherry-pick: fix bug when used with GIT_CHERRY_PICK_HELPZheNing Hu via GitGitGadget, Aug 3, 2021
  9. 1/2 [GSOC] cherry-pick: fix bug when used with GIT_CHERRY_PICK_HELPZheNing Hu via GitGitGadget, Aug 3, 2021
  10. Junio C HamanoAug 3, 2021
  11. ZheNing HuAug 4, 2021
  12. Phillip WoodAug 4, 2021
  13. Junio C HamanoAug 4, 2021
  14. ZheNing HuAug 5, 2021
  15. 2/2 [GSOC] cherry-pick: use better advice messageZheNing Hu via GitGitGadget, Aug 3, 2021
  16. [GSOC] cherry-pick: use better advice messageZheNing Hu via GitGitGadget, Aug 5, 2021
  17. Phillip WoodAug 11, 2021
  18. ZheNing HuAug 13, 2021
  19. Junio C HamanoAug 13, 2021
  20. ZheNing HuAug 14, 2021
  21. Phillip WoodAug 17, 2021
  22. [GSOC] cherry-pick: use better advice messageZheNing Hu via GitGitGadget, Aug 14, 2021
  23. Junio C HamanoAug 14, 2021
  24. ZheNing HuAug 15, 2021
  25. [GSOC] cherry-pick: use better advice messageZheNing Hu via GitGitGadget, Aug 16, 2021
  26. Phillip WoodAug 18, 2021
  27. ZheNing HuAug 19, 2021
  28. ZheNing HuAug 19, 2021
  29. [GSOC] cherry-pick: use better advice messageZheNing Hu via GitGitGadget, Aug 19, 2021
  30. Junio C HamanoAug 19, 2021
  31. ZheNing HuAug 21, 2021
  32. [GSOC] cherry-pick: use better advice messageZheNing Hu via GitGitGadget, Aug 22, 2021

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.