Re: [PATCH 2/2] rebase: add --show-patch

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

 



On Sat, Jan 27, 2018 at 2:11 AM, Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote:
> On Fri, Jan 26, 2018 at 4:55 AM, Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> wrote:
>> 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@xxxxxxxxx>
>> ---
>> 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?

It belongs to the same --continue/--skip/--abort group and won't reach
here unless a rebase is in progress (i.e. $state_dir exists).
-- 
Duy




[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