{"thread":{"id":"57372","subject":"Fwd: $LOCAL and $REMOTE swapped for rebase mergetool","startedAt":"2022-02-06T19:38:49Z","lastAt":"2022-02-06T19:38:49Z","messageCount":1,"participants":["Noam Raphael"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"447844","messageId":"CAO8o=D4yuKheOO1UL7o0u89i=yp3c4KjhLjKPGBptE3-NXObEg@mail.gmail.com","threadId":"57372","inReplyTo":"CAO8o=D7LKUp_Bf54hbVNumhpNKnDO3UKgyOMU_0d0Er87a2zJQ@mail.gmail.com","subject":"Fwd: $LOCAL and $REMOTE swapped for rebase mergetool","fromName":"Noam Raphael","fromEmail":"noamraph@gmail.com","sentAt":"2022-02-06T19:38:29Z","receivedAt":"2022-02-06T19:38:49Z","isPatch":false,"sender":{"key":"noamraph@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1553464?v=4"},"body":"Hi,\n\nWhen using `git mergetool` with `git merge`, the variables $BASE,\n$REMOTE, $LOCAL and $MERGED behave as I would expect.\n\nHowever, when using `git rebase` instead of `git merge`, $LOCAL and\n$REMOTE are swapped - instead of $LOCAL being the local content before\nthe commit and $REMOTE being the content being rebased, it's the other\nway round. This doesn't seem consistent with the git-mergetool man\npage.\n\nThis causes 3-way diff tools to swap the meaning of what's on the left\npane and what's on the right pane. I had to work around this with the\nnew 4-way diff tool that I wrote (https://github.com/noamraph/meld,\ncheck it out!) since it assumes the diff between BASE and REMOTE\nshould be applied to LOCAL, and this doesn't hold.\n\nI think that at least the documentation should be updated. Or perhaps\nthe behavior should change - this actually seems to me like a bug.\n\nCheers,\nNoam\n"}]}