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

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

From
ZheNing Hu <adlternative@gmail.com>
Date
Jul 30, 2021, 14:15 UTC
Message-ID
<CAOLTT8Tj_8ESALm16OV=XxO604Qq_8KKJWYvzA7T=c=92uSyZg@mail.gmail.com>
In-Reply-To
<xmqqzgu43kkz.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> 于2021年7月30日周五 上午4:56写道:
Show 6 quoted lines
>
> The patch is a bit hard to read, but I do not think this improves
> the root cause of the issue at all, which is that "do we need to
> delete the pseudoref?" decision is tied to and based on the presense
> of the custom message in the environment variable.
>

My original idea was to distinguish between cherry-pick calls by machines (git-rebase--preserve-merges.sh) and cherry-pick calls by people through an additional option "rebase-preserve-merges-mode".

Show 11 quoted lines
> The original issue was that we declared (erroneously) that the
> presence of a custom message _means_ the caller is not a human but a
> sequencing machinery that wants to deal with what is done via the
> CHERRY_PICK_HEAD pseudoref itself, and your original issue was that
> when a human user has the custom message envirnoment (either on
> purpose or by mistake), the logic _misidentifies_ the call as if it
> is made from a sequencing machinery and we lose the CHERRY_PICK_HEAD
> pseudoref.  The root cause is mistaking the correlation (sequencing
> machinery uses the environment and it also does not want pseudoref)
> as the causation (presense of the environment means we should remove
> pseudoref).

Ok... Now I guess what you mean is to provide an option for git cherry-pick to specifically delete "CHERRY_PICK_HEAD", and this options is "hidden", it is not provided to users, it is only reserved for sequencing machinery. In this way, we separate print_advice() from deleting "CHERRY_PICK_HEAD". Then in the future, GIT_CHERRY_PICK_HELP will be deleted.

Thanks, -- ZheNing Hu

Previous: Junio C Hamano
Message 5 of 5 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 29, 2021
  2. 2/2 [GSOC] cherry-pick: use better advice messageZheNing Hu via GitGitGadget, Jul 29, 2021
  3. 1/2 [GSOC] cherry-pick: fix bug when used with GIT_CHERRY_PICK_HELPZheNing Hu via GitGitGadget, Jul 29, 2021
  4. Junio C HamanoJul 29, 2021
  5. ZheNing HuJul 30, 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.