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

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.
Previous: Phillip Wood via GitGitGadgetNext: phillip.wood123@gmail.com
Message 2 of 3 in “rebase -i: stop setting GIT_CHERRY_PICK_HELP”
  1. rebase -i: stop setting GIT_CHERRY_PICK_HELPPhillip Wood via GitGitGadget, Feb 27, 2024
  2. Junio C HamanoFeb 27, 2024
  3. phillip.wood123@gmail.comFeb 28, 2024

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.