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

Re: [PATCH] send-email: do not prompt for In-Reply-To

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 27, 2020, 19:34 UTC
Message-ID
<xmqqtuwnq3x1.fsf@gitster.c.googlers.com>
In-Reply-To
<20200827192029.GA63138@Carlos-MBP>
Carlo Marcelo Arenas Belón <carenas@gmail.com> writes:
Show 5 quoted lines
> On Thu, Aug 27, 2020 at 03:14:57PM -0400, Drew DeVault wrote:
>> Do you have sendemail.to set in your local git config?
>
> I do and can't reproduce either; which version of git do you have this
> problem with?

Any recent version of git-send-email, I would say. The relevant code snippets are:

    my $prompting = 0;
    if (!@initial_to && !defined $to_cmd) {
            my $to = ask("$to_whom ",
                         default => "",
                         valid_re => qr/\@.*\./, confirm_only => 1);
            push @initial_to, parse_address_line($to) if defined $to; #
            $prompting++;
    }
    ...
    @initial_to = process_address_list(@initial_to);
    @initial_cc = process_address_list(@initial_cc);
    @initial_bcc = process_address_list(@initial_bcc);
    if ($thread && !defined $initial_in_reply_to && $prompting) {
            $initial_in_reply_to = ask(
                    __("Message-ID to be used as In-Reply-To for the first email (if any)? "),
                    default => "",
                    valid_re => qr/\@.*\./, confirm_only => 1);
    }

where initial_to is set either from the command line or sendemail.to configuration variable and before the control reaches this section of the code. In addition to realizing "ah, To: address is not given so we need to ask" and ask the to address, it says "since we have already interatively asked the end-user anyway, we can and should ask other things as well" by incrementing $prompting.

That feels both understandable and bogus at the same time. To: is pretty much required (yes, you can use cc: and bcc: without any address on To:, but that is not something you'd usually do to send patches to mailing lists), so lack of it means either asking interactively or aborting. But other things like in-reply-to are optional, and tying the decision to prompt for them or not does not feel OK.

Previous: Carlo Marcelo Arenas BelónNext: Drew DeVault
Message 10 of 29 in “send-email: do not prompt for In-Reply-To”
  1. send-email: do not prompt for In-Reply-ToDrew DeVault, Aug 27, 2020
  2. Junio C HamanoAug 27, 2020
  3. Junio C HamanoAug 27, 2020
  4. Drew DeVaultAug 27, 2020
  5. Junio C HamanoAug 27, 2020
  6. Drew DeVaultAug 27, 2020
  7. Carlo Marcelo Arenas BelónAug 27, 2020
  8. Drew DeVaultAug 27, 2020
  9. Carlo Marcelo Arenas BelónAug 27, 2020
  10. Junio C HamanoAug 27, 2020
  11. Drew DeVaultAug 27, 2020
  12. Carlo ArenasAug 27, 2020
  13. Carlo Marcelo Arenas BelónAug 27, 2020
  14. Junio C HamanoAug 27, 2020
  15. Drew DeVaultAug 27, 2020
  16. Drew DeVaultAug 27, 2020
  17. Junio C HamanoAug 28, 2020
  18. Drew DeVaultAug 28, 2020
  19. Raymond E. PascoAug 28, 2020
  20. Drew DeVaultAug 28, 2020
  21. Junio C HamanoAug 27, 2020
  22. Drew DeVaultAug 27, 2020
  23. Drew DeVaultAug 28, 2020
  24. Junio C HamanoAug 28, 2020
  25. Drew DeVaultAug 28, 2020
  26. Junio C HamanoAug 28, 2020
  27. Drew DeVaultAug 28, 2020
  28. Raymond E. PascoAug 28, 2020
  29. Drew DeVaultAug 27, 2020

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.