{"thread":{"id":"23971","subject":"git send-email should always ask for in-reply-to","startedAt":"2010-06-01T14:41:12Z","lastAt":"2010-06-11T20:11:59Z","messageCount":8,"participants":["Alexander Stein","Matthieu Moy","Ævar Arnfjörð Bjarmason","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"142696","messageId":"201006011641.12401.alexander.stein@informatik.tu-chemnitz.de","threadId":"23971","inReplyTo":null,"subject":"git send-email should always ask for in-reply-to","fromName":"Alexander Stein","fromEmail":"alexander.stein@informatik.tu-chemnitz.de","sentAt":"2010-06-01T14:41:12Z","receivedAt":"2010-06-01T14:41:12Z","isPatch":false,"sender":{"key":"alexander.stein@informatik.tu-chemnitz.de","avatar":null},"body":"Hi,\n\ni currently have the problem that, if I set sendemail.from and sendemail.to in \ngit-config (from global and to project-specific but that doesn't matter) git \nsend-email doesn't ask me for a in-reply-to message-ID. I set these 2 config \noptions for convenience. But i also want to specify a message-id after calling \ngit send-email to get a proper thread on the mailing list.\nI dived into git-send-email.perl and found $prompting which is only != 0 if \n$sender or @to isn't already set (lines 672-685). On line 706-709 there are \nsome check whether $initial_reply_to should be asked or not. If $prompting is \nsitll 0 $initial_reply_to will not be asked.\nIn my opinion git send-email should always ask for in-reply-to. I know there \nis --in-reply-to option but this keeps me from using the git command from \nshell history as i have to modify the parameter each time.\n\nWhat do you think about it?\nBest regards\nAlexander\n"},{"id":"142698","messageId":"vpqtypmn4bm.fsf@bauges.imag.fr","threadId":"23971","inReplyTo":"201006011641.12401.alexander.stein@informatik.tu-chemnitz.de","subject":"Re: git send-email should always ask for in-reply-to","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2010-06-01T15:46:37Z","receivedAt":"2010-06-01T15:46:37Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Alexander Stein <alexander.stein@informatik.tu-chemnitz.de> writes:\n\n> i currently have the problem that, if I set sendemail.from and sendemail.to in \n> git-config (from global and to project-specific but that doesn't matter) git \n> send-email doesn't ask me for a in-reply-to message-ID.\n[...]\n> What do you think about it?\n\nI do find this annoying: my name doesn't change often, so I want to\ngive it in ~/.gitconfig, but then the prompt for a message-id\ndisapears. But I didn't find time to make a patch :-(.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"142719","messageId":"1275415730-15360-1-git-send-email-alexander.stein@informatik.tu-chemnitz.de","threadId":"23971","inReplyTo":"vpqtypmn4bm.fsf@bauges.imag.fr","subject":"[PATCH] send-email: Ask for in-reply message ID even if from and to is already known","fromName":"Alexander Stein","fromEmail":"alexander.stein@informatik.tu-chemnitz.de","sentAt":"2010-06-01T18:08:50Z","receivedAt":"2010-06-01T18:08:50Z","isPatch":true,"sender":{"key":"alexander.stein@informatik.tu-chemnitz.de","avatar":null},"body":"This patch removes the prompting variable so git send-email always asks\nfor a in-reply message ID (unless specified on command line) even when\nsendemail.from and sendemail.to is set in ~/.gitconfig or .git/config\n\nSigned-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>\n---\n git-send-email.perl |    7 ++-----\n 1 files changed, 2 insertions(+), 5 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 111c981..4487472 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -136,7 +136,7 @@ my $auth;\n sub unique_email_list(@);\n sub cleanup_compose_files();\n \n-# Variables we fill in automatically, or via prompting:\n+# Variables we fill in automatically:\n my (@to,$no_to,@cc,$no_cc,@initial_cc,@bcclist,$no_bcc,@xh,\n \t$initial_reply_to,$initial_subject,@files,\n \t$author,$sender,$smtp_authpass,$annotate,$compose,$time);\n@@ -669,19 +669,16 @@ sub ask {\n \treturn undef;\n }\n \n-my $prompting = 0;\n if (!defined $sender) {\n \t$sender = $repoauthor || $repocommitter || '';\n \t$sender = ask(\"Who should the emails appear to be from? [$sender] \",\n \t              default => $sender);\n \tprint \"Emails will be sent from: \", $sender, \"\\n\";\n-\t$prompting++;\n }\n \n if (!@to) {\n \tmy $to = ask(\"Who should the emails be sent to? \");\n \tpush @to, parse_address_line($to) if defined $to; # sanitized/validated later\n-\t$prompting++;\n }\n \n sub expand_aliases {\n@@ -703,7 +700,7 @@ sub expand_one_alias {\n @initial_cc = expand_aliases(@initial_cc);\n @bcclist = expand_aliases(@bcclist);\n \n-if ($thread && !defined $initial_reply_to && $prompting) {\n+if ($thread && !defined $initial_reply_to) {\n \t$initial_reply_to = ask(\n \t\t\"Message-ID to be used as In-Reply-To for the first email? \");\n }\n-- \n1.6.4.4\n"},{"id":"143455","messageId":"201006101908.19578.alexander.stein@informatik.tu-chemnitz.de","threadId":"23971","inReplyTo":"1275415730-15360-1-git-send-email-alexander.stein@informatik.tu-chemnitz.de","subject":"Re: [PATCH] send-email: Ask for in-reply message ID even if from and to is already known","fromName":"Alexander Stein","fromEmail":"alexander.stein@informatik.tu-chemnitz.de","sentAt":"2010-06-10T17:08:19Z","receivedAt":"2010-06-10T17:08:19Z","isPatch":true,"sender":{"key":"alexander.stein@informatik.tu-chemnitz.de","avatar":null},"body":"Did get this patch overlooked?\n\nAm Dienstag 01 Juni 2010, 20:08:50 schrieb Alexander Stein:\n> This patch removes the prompting variable so git send-email always asks\n> for a in-reply message ID (unless specified on command line) even when\n> sendemail.from and sendemail.to is set in ~/.gitconfig or .git/config\n> \n> Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>\n> ---\n>  git-send-email.perl |    7 ++-----\n>  1 files changed, 2 insertions(+), 5 deletions(-)\n> \n> diff --git a/git-send-email.perl b/git-send-email.perl\n> index 111c981..4487472 100755\n> --- a/git-send-email.perl\n> +++ b/git-send-email.perl\n> @@ -136,7 +136,7 @@ my $auth;\n>  sub unique_email_list(@);\n>  sub cleanup_compose_files();\n> \n> -# Variables we fill in automatically, or via prompting:\n> +# Variables we fill in automatically:\n>  my (@to,$no_to,@cc,$no_cc,@initial_cc,@bcclist,$no_bcc,@xh,\n>  \t$initial_reply_to,$initial_subject,@files,\n>  \t$author,$sender,$smtp_authpass,$annotate,$compose,$time);\n> @@ -669,19 +669,16 @@ sub ask {\n>  \treturn undef;\n>  }\n> \n> -my $prompting = 0;\n>  if (!defined $sender) {\n>  \t$sender = $repoauthor || $repocommitter || '';\n>  \t$sender = ask(\"Who should the emails appear to be from? [$sender] \",\n>  \t              default => $sender);\n>  \tprint \"Emails will be sent from: \", $sender, \"\\n\";\n> -\t$prompting++;\n>  }\n> \n>  if (!@to) {\n>  \tmy $to = ask(\"Who should the emails be sent to? \");\n>  \tpush @to, parse_address_line($to) if defined $to; # sanitized/validated\n> later -\t$prompting++;\n>  }\n> \n>  sub expand_aliases {\n> @@ -703,7 +700,7 @@ sub expand_one_alias {\n>  @initial_cc = expand_aliases(@initial_cc);\n>  @bcclist = expand_aliases(@bcclist);\n> \n> -if ($thread && !defined $initial_reply_to && $prompting) {\n> +if ($thread && !defined $initial_reply_to) {\n>  \t$initial_reply_to = ask(\n>  \t\t\"Message-ID to be used as In-Reply-To for the first email? \");\n>  }\n"},{"id":"143456","messageId":"AANLkTikHhYcNRPOIWuMYjCnWahS2ydQZ2-vpswSYYohx@mail.gmail.com","threadId":"23971","inReplyTo":"201006101908.19578.alexander.stein@informatik.tu-chemnitz.de","subject":"Re: [PATCH] send-email: Ask for in-reply message ID even if from and to is already known","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-06-10T17:18:16Z","receivedAt":"2010-06-10T17:18:16Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Thu, Jun 10, 2010 at 17:08, Alexander Stein\n<alexander.stein@informatik.tu-chemnitz.de> wrote:\n> Did get this patch overlooked?\n\nPerhaps it would be better accompanied with a test addition in\nt9001-send-email.sh.\n"},{"id":"143480","messageId":"vpqpqzyzfmd.fsf@bauges.imag.fr","threadId":"23971","inReplyTo":"1275415730-15360-1-git-send-email-alexander.stein@informatik.tu-chemnitz.de","subject":"Re: [PATCH] send-email: Ask for in-reply message ID even if from and to is already known","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2010-06-10T22:28:58Z","receivedAt":"2010-06-10T22:28:58Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Alexander Stein <alexander.stein@informatik.tu-chemnitz.de> writes:\n\n> This patch removes the prompting variable so git send-email always asks\n> for a in-reply message ID (unless specified on command line) even when\n> sendemail.from and sendemail.to is set in ~/.gitconfig or .git/config\n\nDoes this mean there's no way to run send-email non-interactively\nwithout a reply-to?\n\nI do want to get the prompt even though I want to set the sender field\nin my ~/.gitconfig, but I wouldn't want the prompt to appear in the\ncron job I run every nights to send me new patches in some repo for\nexample (a change in git-send-email already broke it in the past,\nthat's a rather anoying failure).\n\nYou probably want an option to enable/disable prompting. I'm not sure\nwhether it should be opt-in or opt-out.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"143526","messageId":"7vtyp9ie2a.fsf@alter.siamese.dyndns.org","threadId":"23971","inReplyTo":"201006101908.19578.alexander.stein@informatik.tu-chemnitz.de","subject":"Re: [PATCH] send-email: Ask for in-reply message ID even if from and to is already known","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-06-11T19:06:53Z","receivedAt":"2010-06-11T19:06:53Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alexander Stein <alexander.stein@informatik.tu-chemnitz.de> writes:\n\n> Did get this patch overlooked?\n\nDid you run the existing test suite unattended and make sure everything\nstill passes?\n"},{"id":"143529","messageId":"201006112211.59425.alexander.stein@informatik.tu-chemnitz.de","threadId":"23971","inReplyTo":"7vtyp9ie2a.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] send-email: Ask for in-reply message ID even if from and to is already known","fromName":"Alexander Stein","fromEmail":"alexander.stein@informatik.tu-chemnitz.de","sentAt":"2010-06-11T20:11:59Z","receivedAt":"2010-06-11T20:11:59Z","isPatch":true,"sender":{"key":"alexander.stein@informatik.tu-chemnitz.de","avatar":null},"body":"Am Freitag 11 Juni 2010, 21:06:53 schrieb Junio C Hamano:\n> Did you run the existing test suite unattended and make sure everything\n> still passes?\n\nDuring test suite run I noticed this patch doesn't allow to run the suite \nunattended. This may only work with some config option as Matthieu already \npointed out.\nI will rethink about this problem and repost a new patch\n\nAlexander\n"}]}