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

Re: git-send-email: bug with sendemail.multiedit

From
JDJean-Francois Dagenais <jeff.dagenais@gmail.com>
Date
Jan 10, 2012, 14:23 UTC
Message-ID
<B281FA72-A179-4782-A439-02A71B1C61BF@gmail.com>
In-Reply-To
<20120109225542.GB9902@sigill.intra.peff.net>

Tested with 0/1/true/false, all works as expected, i.e. fix is backward compatible. git version 1.7.8.2

On Jan 9, 2012, at 17:55, Jeff King wrote:
Show 21 quoted lines
> On Mon, Jan 09, 2012 at 02:09:30PM -0500, Jean-Francois Dagenais wrote:
> 
>> I think there is a bug with git-send-email.perl's evaluation of the
>> sendemail.multiedit config variable.
>> 
>> I was only able to make the "do_edit()" function detect it as false by
>> setting the variable to "0" instead of "false", like so:
> 
> I think it's this:
> 
> -- >8 --
> Subject: [PATCH] send-email: multiedit is a boolean config option
> 
> The sendemail.multiedit variable is meant to be a boolean.
> However, it is not marked as such in the code, which means
> we store its value literally. Thus in the do_edit function,
> perl ends up coercing it to a boolean value according to
> perl rules, not git rules. This works for "0", but "false",
> "no", or "off" will erroneously be interpreted as true.
> 
> Signed-off-by: Jeff King <peff@peff.net>
Tested-by: Jean-François Dagenais <jeff.dagenais@gmail.com>
Show 27 quoted lines
> ---
> git-send-email.perl |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/git-send-email.perl b/git-send-email.perl
> index d491db9..ef30c55 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -210,6 +210,7 @@ my %config_bool_settings = (
>     "signedoffbycc" => [\$signed_off_by_cc, undef],
>     "signedoffcc" => [\$signed_off_by_cc, undef],      # Deprecated
>     "validate" => [\$validate, 1],
> +    "multiedit" => [\$multiedit, undef]
> );
> 
> my %config_settings = (
> @@ -227,7 +228,6 @@ my %config_settings = (
>     "bcc" => \@bcclist,
>     "suppresscc" => \@suppress_cc,
>     "envelopesender" => \$envelope_sender,
> -    "multiedit" => \$multiedit,
>     "confirm"   => \$confirm,
>     "from" => \$sender,
>     "assume8bitencoding" => \$auto_8bit_encoding,
> -- 
> 1.7.8
> 
Previous: Junio C HamanoNext: Thomas Rast
Message 4 of 5 in “git-send-email: bug with sendemail.multiedit”
  1. Jean-Francois DagenaisJan 9, 2012
  2. Jeff KingJan 9, 2012
  3. Junio C HamanoJan 9, 2012
  4. Jean-Francois DagenaisJan 10, 2012
  5. Thomas RastJan 10, 2012

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.