Re: [BUG] git-am silently applying patches incorrectly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Colin Guthrie <gmane@xxxxxxxxxxxxxx> writes:

>> If you just send the output of "git format-patch" untouched as an
>> attachment you can expect problems.
>
> Wow! I've never heard of this before... So you're saying it's actually
> invalid to do a git format-patch and then a git am on the files it
> generates?

I don't think you understand what Drew is saying.

The output from format-patch mimics mbox format already; it specifically
was designed so that "format-patch --stdout | am" pipeline would work
without your doing anything funky.

If you include the output from format-patch in your MUA, however, the
message your MUA will send out would look like:

 * From: ... you ...
 * Subject: Hi, I am sending a patch (the message typed to your MUA)
 * Date: ... date ...

 % From <object name> <date looking format-patch signature string>
 % From: ... author name output by format patch
 % Subject: [PATCH] ... first paragraph from commit log message ...

 . The second paragraph and what follows...
 . ---
 . patch

In the above illustration, the lines marked with "*" are what your MUA
would add as the header, and the ones marked with '%' are the headers
format-patch placed to make its output look like mbox.  You are supposed
to move the "Subject: " line marked with '%' to the Subject input field of
your MUA and drop all other lines marked with '%'.

Drew is talking about the problem it causes to the recipient if you did
not do so, and left '%' lines in your MUA.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]