# git-mergetool to be used for rebases as well?

2 messages from 2017-01-10 to 2017-01-10. Participants: Stefan Beller, Junio C Hamano.
Thread: https://gitlist.dev/t/44847

## Stefan Beller, 2017-01-10 18:54

Subject: git-mergetool to be used for rebases as well?
Message-ID: <20170110185421.2638-1-sbeller@google.com>
URL: https://gitlist.dev/e/20170110185421.2638-1-sbeller%40google.com

```
An internal user report running on origin/next:

    $ git pull
        From .
         * branch                ... -> FETCH_HEAD
        First, rewinding head to replay your work on top of it...
        Applying: ...
        Applying: ...
        Using index info to reconstruct a base tree...
        CONFLICT (content): ....
        error: Failed to merge in the changes.
        Patch failed at 0002...
        The copy of the patch that failed is found in: .git/rebase-apply/patch

        When you have resolved this problem, run "git rebase --continue".
        If you prefer to skip this patch, run "git rebase --skip" instead.
        To check out the original branch and stop rebasing, run "git rebase --abort".
    $ git status
        rebase in progress; onto ...
        You are currently rebasing branch '...' on '...'.

        Changes to be committed:
                modified:   ...

        Unmerged paths:
                both modified:   ...

    $ git mergetool
        No files need merging
    $ git diff <file name>
        diff --cc <file name>
        index ...
        --- a/file
        +++ b/file
        @@@ ...
          content
        ++<<<<<<< HEAD
         +  content
        ++=======
        +   content
        ++>>>>>>> other commit
        content


The mergetool used to work apparently, but stopped for rebases.
I noticed in neither t7610-mergetool.sh nor any rebase test the combination of
rebase and mergetool is tested.

Stefan



```

## Junio C Hamano, 2017-01-10 20:26

Subject: Re: git-mergetool to be used for rebases as well?
Message-ID: <xmqqvatmr794.fsf@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqqvatmr794.fsf%40gitster.mtv.corp.google.com
In-Reply-To: <20170110185421.2638-1-sbeller@google.com>

```
Stefan Beller <sbeller@google.com> writes:

>     $ git status
>         rebase in progress; onto ...
>         You are currently rebasing branch '...' on '...'.
>
>         Changes to be committed:
>                 modified:   ...
>
>         Unmerged paths:
>                 both modified:   ...
>
>     $ git mergetool
>         No files need merging
>     $ git diff <file name>
>         diff --cc <file name>
>         index ...
>         --- a/file
>         +++ b/file
>         @@@ ...
>           content
>         ++<<<<<<< HEAD
>          +  content
>         ++=======
>         +   content
>         ++>>>>>>> other commit
>         content
>
>
> The mergetool used to work apparently, but stopped for rebases.
> I noticed in neither t7610-mergetool.sh nor any rebase test the combination of
> rebase and mergetool is tested.

The above redacts too much to be useful for guessing, but are you by
any chance being hit by a recent regression, i.e. have rerere enabled
and running mergetool from a subdirectory?

See <20170109232941.43637-15-hansenr@google.com> (and previous
rounds).

```
