Re: [PATCH] [GSOC] cherry-pick: fix bug when used with GIT_CHERRY_PICK_HELP
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 22, 2021, 21:25 UTC
- Message-ID
- <xmqqo8au82i0.fsf@gitster.g>
- In-Reply-To
- <pull.1001.git.1626962763373.gitgitgadget@gmail.com>
"ZheNing Hu via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 6 quoted lines
> From: ZheNing Hu <adlternative@gmail.com> > > If we set the value of the environment variable GIT_CHERRY_PICK_HELP > when using `git cherry-pick`, CHERRY_PICK_HEAD will be deleted, then > we will get an error when we try to use `git cherry-pick --continue` > or other cherr-pick command.
I think that the GIT_CHERRY_PICK_HELP is an implemention detail for various forms of rebase to use cherry-pick as a backend and not for use by end users.
I strongly suspect that the right solution for the breakage is to unsetenv(GIT_CHERRY_PICK_HELP) in cmd_cherry_pick() without touching sequencer.c at all.
It _is_ ugly that a helper that is responsible for emitting an advise message also makes a decision whether the pseudo-ref gets deleted or not, but a fix to that problem should be done byy making the logic for the decision less complex, not more.
So, I am not enthused to see this change.