Re: [PATCH v2] [GSOC] cherry-pick: fix bug when used with GIT_CHERRY_PICK_HELP
- From
ZheNing Hu <adlternative@gmail.com>
- Date
- Jul 28, 2021, 07:39 UTC
- Message-ID
- <CAOLTT8T9Fu4-r5-2PhNmopW751TBN1LRrwBU70HuKZ48JD1X5Q@mail.gmail.com>
- In-Reply-To
- <a8b260be-dae5-e717-d4cb-3ee123f93620@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> 于2021年7月28日周三 上午3:43写道:
Show 14 quoted lines
>
> > diff --git a/builtin/revert.c b/builtin/revert.c
> > index 237f2f18d4c..ec0abe7db73 100644
> > --- a/builtin/revert.c
> > +++ b/builtin/revert.c
> > @@ -245,6 +245,7 @@ int cmd_cherry_pick(int argc, const char **argv, const char *prefix)
> >
> > opts.action = REPLAY_PICK;
> > sequencer_init_config(&opts);
> > + unsetenv("GIT_CHERRY_PICK_HELP");
>
> This will break git-rebase--preserve-merges.sh which uses
> GIT_CHERRY_PICK_HELP to set the help and ensure CHERRY_PICK_HEAD is
> removed when picking commits. I'm a bit confused as to what the problemYeah, I thought it would call some rebase-related code before, I didn’t expect it to call cherry-pick. On the other hand, I passed all tests, so I ignore it, there should be a test for it.
Show 6 quoted lines
> is - how is 'git cherry-pick' being run with GIT_CHERRY_PICK_HELP set in > the environment outside of a rebase (your explanation in [1] does not > mention how GIT_CHERRY_PICK_HELP is set)? As far as I can see 'git > rebase -i' does not set it so the only case I can think of is > cherry-picking from an exec command while running 'git rebase -p' >
Ah, because I want to find a way to suppress its advice messages about "git commit", and I don’t think anyone else is using this "feature".
Show 7 quoted lines
> Best Wishes > > Phillip > > [1] > https://lore.kernel.org/git/CAOLTT8Ty47fyY7T3d68CYPKh9k+HAHsnCLJ=F0KaLm+0gp3+EQ@mail.gmail.com/ >
Thanks. -- ZheNing Hu