git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood@talktalk.net>
To: Duy Nguyen <pclouds@gmail.com>, phillip.wood@dunelm.org.uk
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH 2/2] rebase: add --show-patch
Date: Tue, 30 Jan 2018 11:15:46 +0000	[thread overview]
Message-ID: <a504c74a-49d4-4921-e763-34f5e7676868@talktalk.net> (raw)
In-Reply-To: <CACsJy8BsJjuxD8hhZ9P2KgTxraRvCJgYt83onBaD_gXA0ZP9DA@mail.gmail.com>

On 26/01/18 11:22, Duy Nguyen wrote:
> On Fri, Jan 26, 2018 at 6:12 PM, Phillip Wood <phillip.wood@talktalk.net> wrote:
>>> diff --git a/git-rebase--merge.sh b/git-rebase--merge.sh
>>> index 06a4723d4d..5c513a9736 100644
>>> --- a/git-rebase--merge.sh
>>> +++ b/git-rebase--merge.sh
>>> @@ -137,6 +137,10 @@ skip)
>>>       finish_rb_merge
>>>       return
>>>       ;;
>>> +show-patch)
>>> +     cmt="$(cat "$state_dir/current")"
>>> +     exec git format-patch --subject-prefix= --stdout "${cmt}^!"
>>> +     ;;
>>>  esac
>>
>> Here and in the git-rebase--interactive you have access to the SHA of
>> the failed pick so you could run git log --patch and git colored output
> 
> Yes. My first revision I actually did "git diff" here. The only
> problem is inconsistency because we can't color "git am --show-patch"
> the same way, the patch source is in text format, not in the repo. But
> if people are ok with that I sure would switch to "git show".
> 
>> and it would use the pager in the same way as 'git am --show-patch' does
> 
> format-patch does set up pager. If it does not I would be very
> annoyed. I added this for convenience after all.
> 
Ah, I didn't realize that (now I come to think of it I've only ever used
--stdout to redirect the output). As my perceived lack of pager was the
main reason I suggested using log I'd ignore me.

I think the suggestion of having a ref for 'rebase -i' and 'rebase -m'
could be good as it'd be more flexible though I'm not sure what you'd do
about plain old rebase.

Best Wishes

Phillip

  reply	other threads:[~2018-01-30 11:15 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-26  9:55 [PATCH 0/2] Add "git rebase --show-patch" Nguyễn Thái Ngọc Duy
2018-01-26  9:55 ` [PATCH 1/2] am: add --show-patch Nguyễn Thái Ngọc Duy
2018-01-26  9:55 ` [PATCH 2/2] rebase: " Nguyễn Thái Ngọc Duy
2018-01-26 11:12   ` Phillip Wood
2018-01-26 11:22     ` Duy Nguyen
2018-01-30 11:15       ` Phillip Wood [this message]
2018-01-26 19:11   ` Eric Sunshine
2018-01-27  1:42     ` Duy Nguyen
2018-01-26 18:47 ` [PATCH 0/2] Add "git rebase --show-patch" Tim Landscheidt
2018-01-27  1:45   ` Duy Nguyen
2018-01-27 11:26 ` Ævar Arnfjörð Bjarmason
2018-01-29 15:09 ` Johannes Schindelin
2018-01-30  9:10   ` Duy Nguyen
2018-01-30 12:32     ` Johannes Schindelin
2018-01-30 20:19       ` Junio C Hamano
2018-02-01  2:06         ` Tim Landscheidt
2018-01-31  9:30 ` [PATCH v2 0/3] " Nguyễn Thái Ngọc Duy
2018-01-31  9:30   ` [PATCH v2 1/3] am: add --show-current-patch Nguyễn Thái Ngọc Duy
2018-01-31  9:40     ` Eric Sunshine
2018-01-31 22:59       ` Junio C Hamano
2018-02-02  9:25         ` Duy Nguyen
2018-02-02  9:46           ` Eric Sunshine
2018-02-02  9:53             ` Duy Nguyen
2018-02-02 18:56           ` Junio C Hamano
2018-01-31  9:30   ` [PATCH] gitignore.txt: elaborate shell glob syntax Nguyễn Thái Ngọc Duy
2018-01-31 23:22     ` Junio C Hamano
2018-02-01  9:59       ` Duy Nguyen
2018-01-31  9:30   ` [PATCH v2 2/3] rebase: add --show-current-patch Nguyễn Thái Ngọc Duy
2018-01-31  9:30   ` [PATCH v2 3/3] rebase: introduce and use pseudo-ref ORIG_COMMIT Nguyễn Thái Ngọc Duy
2018-01-31 23:18     ` Junio C Hamano
2018-02-01 10:02       ` Duy Nguyen
2018-02-02 19:00         ` Junio C Hamano
2018-02-01 11:05     ` Phillip Wood
2018-02-11  9:43   ` [PATCH v3 0/3] Add "git rebase --show-current-patch" Nguyễn Thái Ngọc Duy
2018-02-11  9:43     ` [PATCH v3 1/3] am: add --show-current-patch Nguyễn Thái Ngọc Duy
2018-02-11  9:43     ` [PATCH v3 2/3] rebase: " Nguyễn Thái Ngọc Duy
2018-02-11  9:43     ` [PATCH v3 3/3] rebase: introduce and use pseudo-ref REBASE_HEAD Nguyễn Thái Ngọc Duy
2018-02-22  0:21     ` [PATCH v3 0/3] Add "git rebase --show-current-patch" Junio C Hamano
2018-02-22  0:54       ` Tim Landscheidt
2018-02-23 10:20         ` Duy Nguyen

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=a504c74a-49d4-4921-e763-34f5e7676868@talktalk.net \
    --to=phillip.wood@talktalk.net \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    --subject='Re: [PATCH 2/2] rebase: add --show-patch' \
    /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

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).