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

Re: [PATCH 1/2] git-send-email.perl: Don't add header "In-Reply-To:" when --no-chain-reply-to set

From
Markus Heidelberg <markus.heidelberg@web.de>
Date
Jul 1, 2009, 06:18 UTC
Message-ID
<200907010818.57050.markus.heidelberg@web.de>
In-Reply-To
<a19204c574f407d98be74d54cfd899b43fdc7d26.1246404999.git.joe@perches.com>
Joe Perches, 01.07.2009:
> using
>   git format-patch --thread=shallow -o <foo>
> and
>   git send-email --no-thread --no-chain-reply-to <foo>
I guess you meant --thread here.
> duplicates the headers
> 
>   In-Reply-To:
>   References:

I noticed the duplicated headers when fixing two bugs some weeks ago. I guess to get rid of the duplicated headers, you have to parse the mail that format-patch produces, since you don't have a clue, what format-patch did. I'm not sure if it's worth it, if the duplicated headers don't harm the email standard. It only complicates the tool.

Show 19 quoted lines
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  git-send-email.perl |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/git-send-email.perl b/git-send-email.perl
> index 8ce6f1f..1b9b27e 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -1151,7 +1151,8 @@ foreach my $t (@files) {
>  
>  	# set up for the next message
>  	if ($thread && $message_was_sent &&
> -		($chain_reply_to || !defined $reply_to || length($reply_to) == 0)) {
> +	    ($chain_reply_to && 
> +	     (!defined $reply_to || length($reply_to) == 0))) {
>  		$reply_to = $message_id;
>  		if (length $references > 0) {
>  			$references .= "\n $message_id";

This part of git-send-email seems to be prone for errors, blame it and you will see in the latest commits.

You should run at least the test from the test suite for the particular command you change. Test 49 (threading but no chain-reply-to) from t9001 now fails.

That means, this will fail now (covered by test 49):
  git format-patch -o <foo>
  git send-email --thread --no-chain-reply-to <foo>
and also this (not covered by any test, maybe we should add one):
  git format-patch -o <foo>
  git send-email --thread --chain-reply-to <foo>
Previous: Joe PerchesNext: Joe Perches
Message 3 of 8 in “format-patch and send-email”
  1. 0/2 format-patch and send-emailJoe Perches, Jun 30, 2009
  2. 1/2 git-send-email.perl: Don't add header "In-Reply-To:" when --no-chain-reply-to setJoe Perches, Jun 30, 2009
  3. Markus HeidelbergJul 1, 2009
  4. Joe PerchesJul 1, 2009
  5. Markus HeidelbergJul 1, 2009
  6. Joe PerchesJul 1, 2009
  7. 2/2 format-patch: Add --cover-letter-wrapJoe Perches, Jun 30, 2009
  8. Stephen BoydJul 2, 2009

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.