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

Comments

Projects
None yet
2 participants
@strandloper

strandloper commented Sep 2, 2014

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

This comment has been minimized.

Show comment
Hide comment
@laurentkempe

laurentkempe Sep 2, 2014

Owner

Could you try like that

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

laurentkempe commented Sep 2, 2014

Could you try like that

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

This comment has been minimized.

Show comment
Hide comment
@laurentkempe

laurentkempe Sep 2, 2014

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?

Owner

laurentkempe commented Sep 2, 2014

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

This comment has been minimized.

Show comment
Hide comment
@strandloper

strandloper Sep 2, 2014

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 commented Sep 2, 2014

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

This comment has been minimized.

Show comment
Hide comment
@strandloper

strandloper Sep 2, 2014

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.

strandloper commented Sep 2, 2014

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

This comment has been minimized.

Show comment
Hide comment
@laurentkempe

laurentkempe Sep 2, 2014

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?

Owner

laurentkempe commented Sep 2, 2014

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

This comment has been minimized.

Show comment
Hide comment
@strandloper

strandloper Sep 2, 2014

The one for the user.

strandloper commented Sep 2, 2014

The one for the user.

@laurentkempe

This comment has been minimized.

Show comment
Hide comment
@laurentkempe

laurentkempe Sep 2, 2014

Owner

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

Owner

laurentkempe commented Sep 2, 2014

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

@strandloper

This comment has been minimized.

Show comment
Hide comment
@strandloper

strandloper commented Sep 2, 2014

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment