git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nathan W. Panike" <nathan.panike@gmail.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Allow format-patch to create patches for merges
Date: Mon, 26 Jan 2009 10:27:18 -0600	[thread overview]
Message-ID: <d77df1110901260827j2200fe41oe1b84c387d88aba@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.1.00.0901261604420.25749@intel-tinevez-2-302>

On Mon, Jan 26, 2009 at 9:36 AM, Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> On Mon, 26 Jan 2009, Nathan W. Panike wrote:
>
>> The behavior for git format-patch is to ignore merge commits, producing
>> an empty patch.  The code does not allow the user to change this
>> behavior. This patch changes that behavior by allowing the user to
>> specify -c or -m at the command line to produce a patch for a merge
>> commit.
>
> Your patch is almost perfect, except that you
>
> - lack an explanation when this makes sense (format-patch is commonly used
>  for mail-based patch queues, and only -m 1 would make sense there, and
>  only if you run format-patch with --first-parent),
>
I think I have an unusual workflow where my patch makes sense,
although it probably does not for the vast majority of git users.  I
regularly use 3 machines: S, L, and H.  I keep my work synchronized by
using git.  Normally, I fetch from S to L or to H, depending on which
machine I am working on at the moment.  I also push from L or H to S.
I sporadically lose connectivity to S, so I have a hook in the repo on
S to send a backup email to me on mail server M, which has a more
reliable connection.  This email also serves as a  reminder when I
have moved from one machine to another with a degree of latency; and I
can use the mail queue on M to recreate most of my state, if I cannot
fetch from S.  In this workflow, I would really like git to create a
patch, even in the merge case, and I think I want to see that it was a
merge.

What I do not want to see is an empty patch when a non-trivial change
has occurred, which is the way it works now.

Also, I think I must be issuing the wrong command, as when I do

git format-patch --first-parent --stdout -1 $merge_commit

there is no data, with or without my patch.

> - did not add your Sign-off :-)

Oops.  Thanks for the catch.

>
> Ciao,
> Dscho
>
>

  reply	other threads:[~2009-01-26 16:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-26 14:04 [PATCH] Allow format-patch to create patches for merges Nathan W. Panike
2009-01-26 15:36 ` Johannes Schindelin
2009-01-26 16:27   ` Nathan W. Panike [this message]
2009-01-26 20:45     ` Jeff King
2009-01-26 21:46       ` Nathan W. Panike
2009-01-26 18:33   ` Junio C Hamano

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

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

  git send-email \
    --in-reply-to=d77df1110901260827j2200fe41oe1b84c387d88aba@mail.gmail.com \
    --to=nathan.panike@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --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.
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 NNTP newsgroup(s).