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

git integration improvements #359

Open
lobneroO opened this issue Jun 23, 2023 · 4 comments
Open

git integration improvements #359

lobneroO opened this issue Jun 23, 2023 · 4 comments
Labels

Comments

@lobneroO
Copy link

I have just set up comparePlus as my default git diff tool, so far I'm really happy with it.

There are two things that would make this even better:

  1. (and probably the smaller request): mark which part of the (git) diff is the old version and which the new version.
    -> Since both files in a git diff are name the same and sometimes they are in temp folders, it is not immediately obvious, which of the two is belonging to which part of the git diff.

  2. (and I don't know if this is even possible): add a 4-part merge :-)

Also, since it took my some time to set it up, perhaps it would be useful for others to document the git config entries necessary. I did it like this:

[diff]
tool = npp_compareplus

[difftool]
prompt = false

[difftool "npp_compareplus"]
cmd = \"C:\\Program Files\\Notepad++\\notepad++.exe\" -multiInst -nosession -pluginMessage=compare \"$REMOTE\" \"$LOCAL\"

On a sitenote, this didn't really work if I left out the -multiInst argument. It would open the diff, but it would close after a few seconds without me doing anything. Not sure if that's a bug.

@pnedev
Copy link
Owner

pnedev commented Jun 23, 2023

Hello @lobneroO ,

That is an interesting use-case, thanks for sharing the steps how one can configure it. 👍

About point 2 - I don't think it is feasible. I might look into it sometime in the future but I hardly find time to support Compare.

About point 1 - Looking at your config (-pluginMessage=compare \"$REMOTE\" \"$LOCAL\") it seems that ComparePlus takes the "REMOTE" as the new file (the new version) and "LOCAL" as the old version. I think you should swap their places on the command line (-pluginMessage=compare \"$LOCAL\" \"$REMOTE\"). The new version will be placed in the Notepad++ view configured in ComparePlus's Settings dialog -> Main Settings/Files Position.

If you don't use "-multiInst" the currently opened Notepad++ instance (if any) might interfere but it is not ComparePlus's bug for sure.

BR

@lobneroO
Copy link
Author

I tried changing that and while it works in theory (i.e. old version is on the left, new on the right for me), it now shows the new additional lines in red, i.e. as a removed line. That is rather confusing however, and not really the case.

E.g. in your suggested version:

image

But the lines marked in red are what I added, so what I want (and what is achieved by my posted version) is this:

image

I do agree however, that the ordering in the command is not intuitive, if correct at all. Initially I had it the other way round as well.

@pnedev
Copy link
Owner

pnedev commented Jun 23, 2023

Could you tell me what is your ComparePlus version?

BR

@lobneroO
Copy link
Author

I am using 1.1 installed via the Plugin Admin

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