Re: [PATCH] rebase -i: stop setting GIT_CHERRY_PICK_HELP
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 27, 2024, 18:38 UTC
- Message-ID
- <xmqqil29sqfp.fsf@gitster.g>
- In-Reply-To
- <pull.1678.git.1709042783847.gitgitgadget@gmail.com>
"Phillip Wood via GitGitGadget" <gitgitgadget@gmail.com> writes:
> Note that we retain the changes in e4301f73fff (sequencer: unset > GIT_CHERRY_PICK_HELP for 'exec' commands, 2024-02-02) just in case > GIT_CHERRY_PICK_HELP is set in the environment when "git rebase" is > run.
Is this comment about this part of the code?
Show 6 quoted lines
> + const char *msg;
> +
> + if (is_rebase_i(opts))
> + msg = rebase_resolvemsg;
> + else
> + msg = getenv("GIT_CHERRY_PICK_HELP");Testing is_rebase_i() first means we ignore the environment unconditionally and use our own message always in "rebase -i", no?
Not that I think we should honor the environment variable and let it override our message. I just found the description a bit confusing.
Show 9 quoted lines
> diff --git a/sequencer.h b/sequencer.h > index dcef7bb99c0..437eabd38af 100644 > --- a/sequencer.h > +++ b/sequencer.h > @@ -14,6 +14,8 @@ const char *rebase_path_todo(void); > const char *rebase_path_todo_backup(void); > const char *rebase_path_dropped(void); > > +extern const char *rebase_resolvemsg;
This is more library-ish part of the system than a random file in the builtin/ directory. This place as the final location for the string makes sense to me.
Thanks.