All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Alexander Ziaee via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,
	 Alexander Ziaee <concussious.github@runbox.com>,
	Alexander Ziaee <ziaee@google.com>
Subject: Re: [PATCH] doc/git-format-patch: link git-apply
Date: Mon, 23 Sep 2024 10:03:08 -0700	[thread overview]
Message-ID: <xmqqtte62tgz.fsf@gitster.g> (raw)
In-Reply-To: <pull.1785.git.git.1727010037470.gitgitgadget@gmail.com> (Alexander Ziaee via GitGitGadget's message of "Sun, 22 Sep 2024 13:00:37 +0000")

"Alexander Ziaee via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Alexander Ziaee <ziaee@google.com>
>
> git formatted patches can be applied with git-apply(1),

Not necessarily.  They are meant to be consumed via "am", which
knows how to unwrap MIME, split the message into the log part and
the diff part, and create a commit out of the result, by calling
"mailinfo", "apply" and "comimt-tree" as the underlying mechanism.

Simple patches can often be consumed by "apply", but that is not
guaranteed.

To put it another way, if we link "apply" because format-patch
output can (sometimes) be consumed with the command in order to use
its the diff part, we would need to link "mailinfo" because the
format-patch output can (always) be consumed with the command in
order to extract the log message part and separate the diff part
out.  So I am modereately negative on this change, especially we
already refer readers to "am" (and "am" in turn refers to "apply").

Thanks.

> so link git-apply(1) in git-format-patch(1) § see also.
>
> Signed-off-by:	Alexander Ziaee <ziaee@google.com>
> ---
>     doc/git-format-patch: link git-apply
>
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1785%2Fconcussious%2Fmaster-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1785/concussious/master-v1
> Pull-Request: https://github.com/git/git/pull/1785
>
>  Documentation/git-format-patch.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt
> index 8708b315930..eeebc805d6c 100644
> --- a/Documentation/git-format-patch.txt
> +++ b/Documentation/git-format-patch.txt
> @@ -790,7 +790,7 @@ merge commit.
>  
>  SEE ALSO
>  --------
> -linkgit:git-am[1], linkgit:git-send-email[1]
> +linkgit:git-am[1], linkgit:git-apply[1], linkgit:git-send-email[1]
>  
>  GIT
>  ---
>
> base-commit: 94b60adee30619a05296cf5ed6addb0e6d4e25dc

      reply	other threads:[~2024-09-23 17:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-22 13:00 [PATCH] doc/git-format-patch: link git-apply Alexander Ziaee via GitGitGadget
2024-09-23 17:03 ` 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

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

  git send-email \
    --in-reply-to=xmqqtte62tgz.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=concussious.github@runbox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=ziaee@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.