-
Notifications
You must be signed in to change notification settings - Fork 265
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-changebar: Windows support possible #214
Comments
Git uses its own path representation for files inside its tree, which follows the UNIX path style (forward slashes). So properly convert internal paths from native to Git paths. See libgit2/libgit2#3012 Part of Issue geany#214.
Second part of geany#214.
First, thanks a lot for testing this on Windows! Then, I spent quite some time trying to address both issues. Well, the first is relatively easy as you suggested, all what is needed is converting the paths (6a396b1). The EOL thing was a bit harder, but fortunately libgit2 has API for it too, so it only required a refactor to be able to use that (ee45caa). The only downside (if it is one), is that this requires libgit2 >= 0.21, so some older distributions won't be supported anymore -- but well, that's life. |
Okay, I successfully tested on Windows, paths seems to now work fine. Filters were tested on Linux, but should be the same on Windows. Thanks! |
Awesome! Thank you. The filters also work on Windows, just tested. P.S.: sorry for being so late :(. |
JFTR: here is the promised Windows build of libgit2: |
Git uses its own path representation for files inside its tree, which follows the UNIX path style (forward slashes). So properly convert internal paths from native to Git paths. See libgit2/libgit2#3012 Part of Issue geany#214.
Second part of geany#214.
I recently built libgit2 on Windows. I will publish a ZIP archive soon (AFAIK there are no official Windows binary builds available).
There are only two issues I found so far:
According to libgit2/libgit2#3012 libgit2 does not support backslashes as path seperator in repository paths. However, the current GCB code constructs the path of the file in the repository from the absolute file path and so on Windows it contains backslashes.
The following diff works for me though there is maybe a more elegant solution. It's a naive approach by simply replacing all backslashes by forward slashes:
On Windows git repositories often use a setting which converts line endings in files to the native line ending characters. This confuses the generated diff and so all lines are marked as changed.
One could change that GIT setting but this could cause further troubles.
The best workaround I found so far is ignoring white space in the generated diff. This however is more than we want here because, AFAIU, this ignores any whitespace changes at the end of the line.
So I don't suggest to do this unconditionally but maybe a plugin setting could be added to let the user choose and a hint that this might be especially useful on Windows.
The option itself:
I would take care to include the plugin and the libgit2 library in the Windows installer and related stuff.
The text was updated successfully, but these errors were encountered: