xltrail / git-xl

Git extension: Makes git-diff work for VBA in Excel workbooks (xls* file types)
https://www.xltrail.com/git-xl
MIT License
559 stars 72 forks source link

Diff Not working with Sourcetree or Git-Gui #43

Closed wbarnard closed 5 years ago

wbarnard commented 5 years ago

git diff works as expected from the command line but .xlsm files are being treated as binary files by both Sourcetree and Git-Gui.

Git xltrail/xl versions 4.0 and 3.1 tested

Sourcetree versions 3.1.3 & 3.26 tested

Git is version 2.23.0.windows.1

Git-Gui is version 0.21.GITGUI

git diff works as expected from the Sourcetree MINGW64 terminal and as a new tool command in Git-Gui.

fzumstein commented 5 years ago

Hi, Git XL doesn't support Git-Gui, the only GUI app that supports Git XL is Sourcetree as far as I know.

I have just tested Sourcetree 3.1.3 (I don't get a newer version) with Git XL 0.4.0 and could not replicate your issues.

If you have upgraded from git-xltrail to Git XL, it makes sense to look at your .gitattributes file in your repo and your global .gitconfig file (probably in your user folder) and remove lines with git-xltrail so that only references to git-xl (the new name) are left.

wbarnard commented 5 years ago

I installed Git XL directly, no upgrade from git-xtrail.

I have tried again with a clean install of Git (2.23.0.windows.1), Git XL (0.4.0) and SourceTree (3.1.3). Again it works on the command line but not in SourceTree.

I executed git xltrail install --local in a new repo.

The .gitattributes file from the repo directory:

*.xla diff=xl
*.xla merge=xl
*.xlam diff=xl
*.xlam merge=xl
*.xls diff=xl
*.xls merge=xl
*.xlsb diff=xl
*.xlsb merge=xl
*.xlsm diff=xl
*.xlsm merge=xl
*.xlsx diff=xl
*.xlsx merge=xl
*.xlt diff=xl
*.xlt merge=xl
*.xltm diff=xl
*.xltm merge=xl
*.xltx diff=xl
*.xltx merge=xl

And the .git/config file from the repo directory:

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
[diff "xl"]
    command = git-xl-diff.exe
[merge "xl"]
    name = xl merge driver for Excel workbooks
    driver = git-xl-merge.exe %P %O %A %B

The "Allow external diff drivers" option is enabled in the SourceTree options.

fzumstein commented 5 years ago

I just did the same, installed your versions on a system that had nothing installed previously and it works for me out of the box. Maybe adding a screenshot of your SourceTree helps.

wbarnard commented 5 years ago

Please see the attached screenshot which also shows the corresponding command line output.

soucetree

fzumstein commented 5 years ago

I am sorry I have no idea what the issue could be but I would recommend to ask on the SourceTree forum: https://community.atlassian.com/t5/Sourcetree-questions/SourceTree-VBA-Macros-via-xltrail/qaq-p/818400

I am closing this issue as I can't replicated and I suspect the issue on the side of SourceTree.