git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Wang Yugui <wangyugui@e16-tech.com>, git@vger.kernel.org
Subject: Re: [PATCH] docs/format-patch: mention handling of merges
Date: Mon, 22 Feb 2021 15:31:53 -0800	[thread overview]
Message-ID: <xmqqv9aj65na.fsf@gitster.g> (raw)
In-Reply-To: <YDQ5YIeXGiR5nvLH@coredump.intra.peff.net> (Jeff King's message of "Mon, 22 Feb 2021 18:08:16 -0500")

Jeff King <peff@peff.net> writes:

> Subject: [PATCH] docs/format-patch: mention handling of merges
>
> Format-patch doesn't have a way to format merges in a way that can be
> applied by git-am (or any other tool), and so it just omits them.
> However, this may be a surprising implication for users who are not well
> versed in how the tool works. Let's add a note to the documentation
> making this more clear.
> ...
> +CAVEATS
> +-------
> +
> +Note that `format-patch` cannot represent commits with more than one
> +parent (i.e., merges) and will silently omit them entirely from its
> +output, even if they are part of the requested range.


I think "cannot represent" is a little bit misleading, unless we
expect the readers already know what we are trying to say (in which
case there is no point in documenting this).  Perhaps something like
this might clarify a bit, though.

    Note that `format-patch` omits merge commits from the output,
    because it is impossible to turn a merge commit into a simple
    "patch" in such a way that allows receiving end to reproduce the
    same merge commit.


  reply	other threads:[~2021-02-22 23:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-22 13:16 git format-patch lost the last part when branch merge Wang Yugui
2021-02-22 22:57 ` Jeff King
2021-02-22 23:08   ` [PATCH] docs/format-patch: mention handling of merges Jeff King
2021-02-22 23:31     ` Junio C Hamano [this message]
2021-02-22 23:40       ` Jeff King
2021-02-23  1:24         ` Junio C Hamano
2021-02-23  1:48           ` Jeff King
2021-02-22 23:25   ` git format-patch lost the last part when branch merge Junio C Hamano
2021-02-24  4:24   ` Elijah Newren
2021-02-24  4:50     ` Jeff King

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=xmqqv9aj65na.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=wangyugui@e16-tech.com \
    --subject='Re: [PATCH] docs/format-patch: mention handling of merges' \
    /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

Code repositories for project(s) associated with this 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).