git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Pádraig Brady" <P@draigBrady.com>
Cc: git@vger.kernel.org
Subject: Re: git format-patch doesn't exclude merged hunks
Date: Wed, 16 May 2012 15:42:14 -0700	[thread overview]
Message-ID: <7v4nrfd9yx.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <4FB40A7E.80705@draigBrady.com> ("Pádraig Brady"'s message of "Wed, 16 May 2012 21:13:50 +0100")

Pádraig Brady <P@draigBrady.com> writes:

> On 05/16/2012 08:12 PM, Junio C Hamano wrote:
>> A patch that is reduced in a way you propose will apply to the receiving
>> tree cleanly without stopping, and does not offer an editor session to
>> adjust the log before making a commit.  "The user has a chance to notice
>> and correct" is not sufficient---nobody will spend extra effort to notice
>> let alone correct.  The reminder has to be a lot stronger than that, I
>> think, to cause the patch application to "fail" and require the user to
>> actively look at the situation.
>
> Yes it would make sense for `git am` to balk at such reduced patches,
> while allowing standard patch utilities to process the patches as
> normal.

That certainly is one way to implement it, but "am" may not necessarily be
the best place to do so, depending on how you are using the output from
format-patch.  It does not matter if you are using "format-patch" piped to
"am -3" as a more efficient way to cherry-pick or rebase commits, but if
you are sending the result out to somebody else, you would instead want to
sanitize the mess on your end, wouldn't you?

That would mean that "format-patch" needs to do more than just "mark a
part of its output being suspicious".  This is especially true as some
people blindly send out format-patch output using the interface to "git
send-email" without first verifying if the patches they are sending out is
what they want to send out.

      reply	other threads:[~2012-05-16 22:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-16 15:42 git format-patch doesn't exclude merged hunks Pádraig Brady
2012-05-16 18:49 ` Junio C Hamano
2012-05-16 19:04   ` Pádraig Brady
2012-05-16 19:12     ` Junio C Hamano
2012-05-16 20:13       ` Pádraig Brady
2012-05-16 22:42         ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v4nrfd9yx.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=P@draigBrady.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).