GumTreeDiff / gumtree

An awesome code differencing tool
https://github.com/GumTreeDiff/gumtree/wiki
GNU Lesser General Public License v3.0
893 stars 170 forks source link

Reversed left and right in git gd command #338

Closed pouryafard75 closed 5 months ago

pouryafard75 commented 5 months ago

Hello, I have started to use the docker image and git gd alias which is very cool.

I think left and right must be reversed for git gd command, because based on git diff, you can see that I have added a single line of code:

image

Meanwhile, git gd shows the following:

image

basically /private/$REMOTE must be mounted to /diff/right and /private/$LOCAL to /diff/left which is surprising according to their names. I will wait for your confirmation in case I am mistaken.

I can submit the PR as soon as you confirm.

jrfaller commented 5 months ago

Hi @pouryafard75 and thanks for the report!

In my gitconfig I have

[difftool "gumtree-webdiff"]
cmd = gumtree webdiff "$LOCAL" "$REMOTE"

This configuration is working for me.

The README.md for the dockerfile indicates:

[difftool "gumtree-docker"]
    cmd = docker run -v $REMOTE:/diff/left -v $LOCAL:/diff/right -p 4567:4567 gumtreediff/gumtree webdiff left/ right/

Therefore I suspect that indeed $LOCAL should be mapped to left and $REMOTE to right no?

If you have a working configuration I would be grateful for a PR (on the README of the Dockerfile right?) :-)

Cheers!