Re: [PATCH 4/4] am: support --show-current-patch=diff to retrieve .git/rebase-apply/patch

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

 



On Wed, Feb 19, 2020 at 11:15 AM <pbonzini@xxxxxxxxxx> wrote:
> When "git am --show-current-patch" was added in commit 984913a210 ("am:
> add --show-current-patch", 2018-02-12), "git am" started recommending it
> as a replacement for .git/rebase-merge/patch.  Unfortunately the suggestion
> is misguided, for example the output "git am --show-current-patch" cannot
> be passed to "git apply" if it is encoded as quoted-printable or base64.
> Add a new mode to "git am --show-current-patch" in order to straighten
> the suggestion.
>
> Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
> ---
> diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
> @@ -16,7 +16,7 @@ SYNOPSIS
> -'git am' (--continue | --skip | --abort | --quit | --show-current-patch[=raw])
> +'git am' (--continue | --skip | --abort | --quit | --show-current-patch[=raw|diff])

Missing parentheses. To be consistent with other documentation, this
should be written as:

    --show-current-patch[=(raw|diff)]

> @@ -176,9 +176,11 @@ default.   You can use `--no-utf8` to override this.
> ---show-current-patch[=raw]::
> -       Show the entire e-mail message "git am" has stopped at, because
> -       of conflicts.
> +--show-current-patch[=raw|diff]::

Ditto: --show-current-patch[=(raw|diff)]::

> +       Show the message "git am" has stopped at, because of conflicts.

The weirdly-placed comma is still weird.

> +       If the argument is absent or "raw", show the raw contents of
> +       the e-mail message.  If the argument is "diff", show the diff
> +       portion only.

I think the usual term is "omitted" rather than "absent".

Suggested rewrite:

    Show the message at which `git am` has stopped due to conflicts.
    If `raw` is specified, show the raw contents of the e-mail
    message; if `diff`, show the diff portion only. Defaults to `raw`.

This also simplifies the change if the default ever flips from "raw" to "diff".



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux