emacs-devel
[Top][All Lists]
Advanced

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

Re: git-send-email


From: Eli Zaretskii
Subject: Re: git-send-email
Date: Mon, 15 Jun 2020 17:42:42 +0300

> From: Kévin Le Gouguec <kevin.legouguec@gmail.com>
> Cc: stefan@marxist.se,  alan@idiocy.org,  emacs-devel@gnu.org,
>   schwab@linux-m68k.org,  hi-angel@yandex.ru
> Date: Mon, 15 Jun 2020 10:23:16 +0200
> 
> AFAIU, git send-email literally just runs format-patch, and sends the
> result (with said optional annotation) over SMTP.  I'm not sure what
> difference this makes as far as authorship authenticity is concerned?
> The From field used by git send-email is literally the From field set by
> git format-patch.
> 
> Really, the only differences that I can see between format-patch and
> send-email are
> 
> - for contributors, no need to whip out a mail client and fiddle with
>   attachments,
> 
> - for maintainers, no need to scan the mail for attachments; just pipe
>   the mail itself to git am.

You need to look at this from the right vantage point: the POV of me
(or someone else) who needs to install changes in such an email.  I'm
on the receiving end of the email, so I have no idea what command(s)
were used to create and send it.  All I see is a random email message,
not unlike many others, just with diffs in its body.  You suggest to
pipe it into Git, but how do I know it's in a proper format to be
processed correctly by Git?  There's no clue.  I need to read the
relevant parts of the email to verify:

 . that the Subject line is appropriate for the heading of the commit
   log message
 . that the From header names the author, and was not rewritten in
   transit by some mailing-list software or another MTA
 . that the Date makes sense
 . that the diffs weren't wrapped by whatever MUA was used
 . that the diffs and the body are properly encoded

And even after all that, I can never be sure that Git will process the
patch, because my decision that the format is proper is just a guess.
Any single problem I missed, and I get to recover with "am --abort",
clean up my repository, find out what was wrong, etc.

All of this wastes time and energy, which adds up when you need to
process more than just a couple of submissions.

By contrast, when the changes are formatted by "git format-patch" and
included in the body, preferably as an attachment, the patch has a
clear-cut signature, it has its own "From" header that identifies the
author independently of the address from which the email was sent, it
has the commit date independent of the mailing timestamp, and I can
trust its encoding.  In this case, I just pipe into "git am" without
much effort.

Do you see now why we prefer the latter?  And it isn't like Emacs is
the only project; many GNU projects also prefer to have patches
submitted in this format.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]