Debian Bug report logs - #593542
git-email: Duplicate headers when combining git format-patch with git send-email

version graph

Package: git-email; Maintainer for git-email is Jonathan Nieder <jrnieder@gmail.com>; Source for git-email is src:git (PTS, buildd, popcon).

Reported by: ametzler@bebt.de

Date: Thu, 19 Aug 2010 06:51:02 UTC

Severity: normal

Tags: upstream

Found in versions git/1:1.7.2.3-2.2, git/1:1.7.1-1.1

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#593542; Package git-email. (Thu, 19 Aug 2010 06:51:05 GMT) (full text, mbox, link).


Acknowledgement sent to Andreas Metzler <ametzler@downhill.at.eu.org>:
New Bug report received and forwarded. Copy sent to Gerrit Pape <pape@smarden.org>. (Thu, 19 Aug 2010 06:51:05 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Andreas Metzler <ametzler@downhill.at.eu.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: git-email: Duplicate headers when combining git format-patch with git send-email
Date: Thu, 19 Aug 2010 08:46:56 +0200
Package: git-email
Version: 1:1.7.1-1.1
Severity: normal

It is very easy to shoot yourself into the respective foot when
combining git format-patch with git send-email:

ametzler@argenau:/tmp/WMAKER/wmaker-crm.git$ git format-patch -o /tmp/gittest -M --to=ametzler@downhill.at.eu.org --thread=shallow 8b6f37d4bb5245d5debcf3aad30e9d98cceb3db9
/tmp/gittest/0001-actually-add-bug-number.patch
/tmp/gittest/0002-SelectWindowsMouseButton-MouseLeftButtonAction.patch
ametzler@argenau:/tmp/WMAKER/wmaker-crm.git$ git send-email --to=ametzler@downhill.at.eu.org --smtp-server=localhost --suppress-cc=self /tmp/gittest/
[...]

With these options git send-email sends out mails that have:
* Two To: headers
* Two In-Reply-To: headers
* Two References: headers

In the given example all duplicate headers are identical, but that is
just the specific example, git send-email will happily add conflicting
To, In-Reply-To and References headers.

git send-email should check for existing headers in the input mbox
files and replace them (or at least rename them, e.g.
X-Original-To: ...) instead of blindly appending new ones.

Bug report written on lenny, I originally experienced the issue with
the backport 1:1.7.1-1.1~bpo50+1 but have verified that the package in
sid behaves the same way.

cu andreas

-- System Information:
Debian Release: 5.0.5
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.26-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages git-email depends on:
ii  git                  1:1.7.1-1.1 fast, scalable, distributed revisi

Versions of packages git-email recommends:
pn  libauthen-sasl-perl           <none>     (no description available)
ii  libemail-valid-perl           0.179-2    Check validity of Internet email a
pn  libnet-smtp-ssl-perl          <none>     (no description available)

Versions of packages git-email suggests:
pn  git-doc                       <none>     (no description available)

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#593542; Package git-email. (Thu, 19 Aug 2010 22:33:03 GMT) (full text, mbox, link).


Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Thu, 19 Aug 2010 22:33:03 GMT) (full text, mbox, link).


Message #10 received at 593542@bugs.debian.org (full text, mbox, reply):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Andreas Metzler <ametzler@downhill.at.eu.org>
Cc: 593542@bugs.debian.org, Daniel Barkalow <barkalow@iabervon.org>, Thomas Rast <trast@student.ethz.ch>, Josh Triplett <josh@joshtriplett.org>
Subject: Re: Bug#593542: git-email: Duplicate headers when combining git format-patch with git send-email
Date: Thu, 19 Aug 2010 17:28:57 -0500
tags 593542 + upstream
quit

(+cc: some format-patch --thread people for input)

Andreas Metzler wrote:

> It is very easy to shoot yourself into the respective foot when
> combining git format-patch with git send-email:
> 
> ametzler@argenau:/tmp/WMAKER/wmaker-crm.git$ git format-patch -o /tmp/gittest -M --to=ametzler@downhill.at.eu.org --thread=shallow 8b6f37d4bb5245d5debcf3aad30e9d98cceb3db9
> /tmp/gittest/0001-actually-add-bug-number.patch
> /tmp/gittest/0002-SelectWindowsMouseButton-MouseLeftButtonAction.patch
> ametzler@argenau:/tmp/WMAKER/wmaker-crm.git$ git send-email --to=ametzler@downhill.at.eu.org --smtp-server=localhost --suppress-cc=self /tmp/gittest/
> [...]
> 
> With these options git send-email sends out mails that have:
> * Two To: headers
> * Two In-Reply-To: headers
> * Two References: headers

Yep, that's true.  There is this odd tension between format-patch and
send-email options, since format-patch --to and so on came later and were
not really meant for use with send-email as far as I can tell.

Probably "git send-email" should override and warn about existing headers
when it adds its own.

Thanks for the report,
Jonathan




Added tag(s) upstream. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Thu, 19 Aug 2010 22:33:04 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#593542; Package git-email. (Fri, 20 Aug 2010 00:33:03 GMT) (full text, mbox, link).


Acknowledgement sent to Josh Triplett <josh@joshtriplett.org>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Fri, 20 Aug 2010 00:33:03 GMT) (full text, mbox, link).


Message #17 received at 593542@bugs.debian.org (full text, mbox, reply):

From: Josh Triplett <josh@joshtriplett.org>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Andreas Metzler <ametzler@downhill.at.eu.org>, 593542@bugs.debian.org, Daniel Barkalow <barkalow@iabervon.org>, Thomas Rast <trast@student.ethz.ch>
Subject: Re: Bug#593542: git-email: Duplicate headers when combining git format-patch with git send-email
Date: Thu, 19 Aug 2010 17:31:17 -0700
On Thu, Aug 19, 2010 at 05:28:57PM -0500, Jonathan Nieder wrote:
> (+cc: some format-patch --thread people for input)
> 
> Andreas Metzler wrote:
> 
> > It is very easy to shoot yourself into the respective foot when
> > combining git format-patch with git send-email:
> > 
> > ametzler@argenau:/tmp/WMAKER/wmaker-crm.git$ git format-patch -o /tmp/gittest -M --to=ametzler@downhill.at.eu.org --thread=shallow 8b6f37d4bb5245d5debcf3aad30e9d98cceb3db9
> > /tmp/gittest/0001-actually-add-bug-number.patch
> > /tmp/gittest/0002-SelectWindowsMouseButton-MouseLeftButtonAction.patch
> > ametzler@argenau:/tmp/WMAKER/wmaker-crm.git$ git send-email --to=ametzler@downhill.at.eu.org --smtp-server=localhost --suppress-cc=self /tmp/gittest/
> > [...]
> > 
> > With these options git send-email sends out mails that have:
> > * Two To: headers
> > * Two In-Reply-To: headers
> > * Two References: headers
> 
> Yep, that's true.  There is this odd tension between format-patch and
> send-email options, since format-patch --to and so on came later and were
> not really meant for use with send-email as far as I can tell.
> 
> Probably "git send-email" should override and warn about existing headers
> when it adds its own.

Certainly the result of having duplicate headers seems wrong.  Ideally,
git send-email should augment existing addressing headers (avoiding
duplicate addresses), and override conflicting message-id/threading
headers.

I do wonder, though, how often git send-email sends patches not
generated by git format-patch.  I'd guess not often.  The reverse seems
somewhat more likely.  Ideally that would allow deduplicating this
functionality, but any change to git send-email, even if phased in
slowly, would probably break a lot of scripts.

To make such a change compatibly, I wonder if git format-patch could
support rereading and reformatting patches, and send-email could invoke
it?  Seems convoluted though.

- Josh Triplett




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#593542; Package git-email. (Fri, 20 Aug 2010 02:45:06 GMT) (full text, mbox, link).


Acknowledgement sent to Daniel Barkalow <barkalow@iabervon.org>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Fri, 20 Aug 2010 02:45:06 GMT) (full text, mbox, link).


Message #22 received at 593542@bugs.debian.org (full text, mbox, reply):

From: Daniel Barkalow <barkalow@iabervon.org>
To: Josh Triplett <josh@joshtriplett.org>
Cc: Jonathan Nieder <jrnieder@gmail.com>, Andreas Metzler <ametzler@downhill.at.eu.org>, 593542@bugs.debian.org, Thomas Rast <trast@student.ethz.ch>
Subject: Re: Bug#593542: git-email: Duplicate headers when combining git format-patch with git send-email
Date: Thu, 19 Aug 2010 22:36:39 -0400 (EDT)
On Thu, 19 Aug 2010, Josh Triplett wrote:

> On Thu, Aug 19, 2010 at 05:28:57PM -0500, Jonathan Nieder wrote:
> > (+cc: some format-patch --thread people for input)
> > 
> > Andreas Metzler wrote:
> > 
> > > It is very easy to shoot yourself into the respective foot when
> > > combining git format-patch with git send-email:
> > > 
> > > ametzler@argenau:/tmp/WMAKER/wmaker-crm.git$ git format-patch -o /tmp/gittest -M --to=ametzler@downhill.at.eu.org --thread=shallow 8b6f37d4bb5245d5debcf3aad30e9d98cceb3db9
> > > /tmp/gittest/0001-actually-add-bug-number.patch
> > > /tmp/gittest/0002-SelectWindowsMouseButton-MouseLeftButtonAction.patch
> > > ametzler@argenau:/tmp/WMAKER/wmaker-crm.git$ git send-email --to=ametzler@downhill.at.eu.org --smtp-server=localhost --suppress-cc=self /tmp/gittest/
> > > [...]
> > > 
> > > With these options git send-email sends out mails that have:
> > > * Two To: headers
> > > * Two In-Reply-To: headers
> > > * Two References: headers
> > 
> > Yep, that's true.  There is this odd tension between format-patch and
> > send-email options, since format-patch --to and so on came later and were
> > not really meant for use with send-email as far as I can tell.
> > 
> > Probably "git send-email" should override and warn about existing headers
> > when it adds its own.
> 
> Certainly the result of having duplicate headers seems wrong.  Ideally,
> git send-email should augment existing addressing headers (avoiding
> duplicate addresses), and override conflicting message-id/threading
> headers.
> 
> I do wonder, though, how often git send-email sends patches not
> generated by git format-patch.  I'd guess not often.  The reverse seems
> somewhat more likely.  Ideally that would allow deduplicating this
> functionality, but any change to git send-email, even if phased in
> slowly, would probably break a lot of scripts.

I certainly always used format-patch to generate messages which I would 
then send with my regular mailer (thereby getting into my regular 
sent-mail folder &c). I'd guess that send-email, at least when sending 
patches that have already been written out, ought to not add identical 
headers and add its arguments to the existing headers instead of adding 
new ones; I'd expect that existing scripts would be fine with this 
behavior, since it only affects a combination of circumstances whose 
current behavior is invalid.

	-Daniel
*This .sig left intentionally blank*




Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#593542; Package git-email. (Fri, 20 Aug 2010 06:33:03 GMT) (full text, mbox, link).


Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Fri, 20 Aug 2010 06:33:03 GMT) (full text, mbox, link).


Message #27 received at 593542@bugs.debian.org (full text, mbox, reply):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: Josh Triplett <josh@joshtriplett.org>, Andreas Metzler <ametzler@downhill.at.eu.org>, 593542@bugs.debian.org, Thomas Rast <trast@student.ethz.ch>
Subject: Re: Bug#593542: git-email: Duplicate headers when combining git format-patch with git send-email
Date: Fri, 20 Aug 2010 01:27:32 -0500
Daniel Barkalow wrote:

> I'd guess that send-email, at least when sending 
> patches that have already been written out, ought to not add identical 
> headers and add its arguments to the existing headers instead of adding 
> new ones; I'd expect that existing scripts would be fine with this 
> behavior, since it only affects a combination of circumstances whose 
> current behavior is invalid.

Makes sense.  Thanks, all.




Bug Marked as found in versions git/1:1.7.2.3-2.2. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Thu, 03 Feb 2011 21:12:28 GMT) (full text, mbox, link).


Changed Bug submitter to 'ametzler@bebt.de' from 'Andreas Metzler <ametzler@downhill.at.eu.org>' Request was from Andreas Metzler <ametzler@bebt.de> to control@bugs.debian.org. (Sat, 16 Nov 2013 12:54:11 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#593542; Package git-email. (Mon, 12 May 2014 16:00:04 GMT) (full text, mbox, link).


Acknowledgement sent to Paul Eggleton <paul.eggleton@linux.intel.com>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Mon, 12 May 2014 16:00:04 GMT) (full text, mbox, link).


Message #36 received at 593542@bugs.debian.org (full text, mbox, reply):

From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: 593542@bugs.debian.org
Subject: Re: Bug#593542: git-email: Duplicate headers when combining git format-patch with git send-email
Date: Mon, 12 May 2014 16:40:54 +0100
Hi there,

This still seems to be a problem as of git 1.9.0; in particular I've had a 
report that because of the erroneously duplicated headers, patches I've 
created using git-format-patch and then sent with git-send-email are getting 
caught in spam filters. 

Is there any chance of this one getting fixed?

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



Information forwarded to debian-bugs-dist@lists.debian.org, Gerrit Pape <pape@smarden.org>:
Bug#593542; Package git-email. (Thu, 02 Aug 2018 11:39:04 GMT) (full text, mbox, link).


Acknowledgement sent to Nora Westkott <nwestkott@groton.k12.ct.us>:
Extra info received and forwarded to list. Copy sent to Gerrit Pape <pape@smarden.org>. (Thu, 02 Aug 2018 11:39:04 GMT) (full text, mbox, link).


Message #41 received at 593542@bugs.debian.org (full text, mbox, reply):

From: Nora Westkott <nwestkott@groton.k12.ct.us>
To: "no-reply@microsoft.uk" <no-reply@microsoft.uk>
Subject: Your email box account is about to be suspended
Date: Thu, 2 Aug 2018 07:10:14 +0000
Email Verification Notification

Your email box account is about to be suspended because it has not be verify by the Microsoft verification team. Do verify<https://bdgd52.wixsite.com/dddd> now or it will be suspended.


Microsoft Verification Team



Microsoft © 2018 Webmail .Inc .





























?


THIS MESSAGE IS CONFIDENTIAL. This e-mail message and any attachments are proprietary and confidential information intended only for the use of the recipient(s) named above. If you are not the intended recipient, you may not print, distribute, or copy this message or any attachments. If you have received this communication in error, please notify the sender by return e-mail and delete this message and any attachments from your computer.



Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Nov 24 04:00:23 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.