git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Phillip Wood via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,
	 Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Phillip Wood <phillip.wood@dunelm.org.uk>
Subject: Re: [PATCH] rebase -i: stop setting GIT_CHERRY_PICK_HELP
Date: Tue, 27 Feb 2024 10:38:34 -0800	[thread overview]
Message-ID: <xmqqil29sqfp.fsf@gitster.g> (raw)
In-Reply-To: <pull.1678.git.1709042783847.gitgitgadget@gmail.com> (Phillip Wood via GitGitGadget's message of "Tue, 27 Feb 2024 14:06:23 +0000")

"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?

> +	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.

> 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.

  reply	other threads:[~2024-02-27 18:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-27 14:06 [PATCH] rebase -i: stop setting GIT_CHERRY_PICK_HELP Phillip Wood via GitGitGadget
2024-02-27 18:38 ` Junio C Hamano [this message]
2024-02-28 14:45   ` phillip.wood123

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqil29sqfp.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).