Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show Difference fails with DiffMerge for file names with spaces #38

Closed
strandloper opened this issue Sep 2, 2014 · 8 comments
Closed
Labels

Comments

@strandloper
Copy link

I have DiffMerge configured as my diff tool as follows.

[diff]
    tool = diffmerge
[difftool "diffmerge"]
    cmd = \"C:\\Program Files\\SourceGear\\Common\\DiffMerge\\sgdm.exe\" $LOCAL $REMOTE

I can use Compare with Unmodified... in the VS2013 Changes window and the diff opens in DiffMerge as expected. But when I use GitDiffMargin's Show Difference for the same file, which happens to have spaces in the path, I get DiffMerge errors like this.

File (C:\Projects\Database\DeviceConfiguration\Schemas\dynamix\Stored) not found.  File (Procedures\CopyLibraryForNewDatabase.sql) not found.

The full path to the file is

C:\Projects\Database\DeviceConfiguration\Schemas\dynamix\Stored Procedures\CopyLibraryForNewDatabase.sql

so it appears that the path is being split on the space.

I wondered if quoting the arguments to the command in .gitconfig would make a difference so I tried changing it to

[difftool "diffmerge"]
cmd = \"C:\\Program Files\\SourceGear\\Common\\DiffMerge\\sgdm.exe\" \"$LOCAL\" \"$REMOTE\"

but this did not solve the problem.

@laurentkempe
Copy link
Owner

Could you try like that

[difftool "diffmerge"]
cmd = C:/Program Files/SourceGear/Common/DiffMerge/sgdm.exe \"$LOCAL\" \"$REMOTE\"

@laurentkempe
Copy link
Owner

I think the real problem should be solved when you updated to "$LOCAL" "$REMOTE"

Did you restarted Visual Studio after changing it? On which config did you updated that?

@strandloper
Copy link
Author

I updated it in ~/.gitconfig and did restart VS, but I had two instances of VS open and restarted only one so that might make a difference. I will try again now.

@strandloper
Copy link
Author

I made that change again, rebooted just in case it might be cached somewhere, then opened VS to try again and still get the error.

@laurentkempe
Copy link
Owner

That's weird! I will have to check a bit more the code.

Which config you changed, the one for the repo or the one for the user?

@strandloper
Copy link
Author

The one for the user.

@laurentkempe
Copy link
Owner

Thanks for the report @strandloper I will provide a patch for this issue in the next patch release!

@strandloper
Copy link
Author

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants