Re: [PATCH 2/2] rebase: add --show-patch
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Jan 26, 2018, 19:11 UTC
- Message-ID
- <CAPig+cSjxiOTEKuOR9zGrY=Z_RoSBPHaiyNkzp-tXjSVNj3RHg@mail.gmail.com>
- In-Reply-To
- <20180126095520.919-3-pclouds@gmail.com>
On Fri, Jan 26, 2018 at 4:55 AM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
Show 19 quoted lines
> It is useful to see the full patch while resolving conflicts in a
> rebase. The only way to do it now is
>
> less .git/rebase-*/patch
>
> which could turn out to be a lot longer to type [1] if you are in a
> linked worktree, or not at top-dir. On top of that, an ordinary user
> should not need to peek into .git directory. The new option is
> provided to examine the patch.
> [...]
>
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> ---
> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
> @@ -840,6 +840,10 @@ To continue rebase after editing, run:
> +show-patch)
> + cmt="$(cat "$state_dir/stopped-sha")"
> + exec git format-patch --subject-prefix= --stdout "${cmt}^!"
> + ;;What is the behavior if a rebase (or conflicted rebase) is not in progress? Stated differently, do we only make it this far if $state_dir/stopped_sha exists?