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 cola not saving configuration on Windows #927
Comments
To further clarify: I mean git-cola settings, not git settings. |
This sometimes also happens to me in "All repositories" tab. Works good in "This Repository" tab. Can you check this is your case too? |
I suspect it's the part where we figure out where your Someone with a Windows machine can do a little poking around and see what's changed in Git for Windows, or possibly your specific configuration, that is breaking these assumptions. The file of interest is In general, supporting windows is a royal pain in the aardvark, and I sometimes wonder whether it's even worth it. I don't run Windows so any help from Windows users is appreciated. The other possibility is that |
Yes, this exactly. Changes to "This repository" are preserved, while changes to "All repositories" reset as soon as I move to a different tab in "Preferences" window. @davvid , I will try to check what you describe. |
For what is worth: My actual .gitconfig file, as used by git bash, is located in
|
On the other hand... saving some preferences work. Just not those in the "preferences" dialog. For example, saving recent repositories works. Adding custom toolbars too. |
Very interesting. As a test in your configuration where you have
I suspect that will do the right thing and print From reading the logic, that should make it behave correctly. Let me know if you're able to run cola from its source tree. If so I can push up a test branch to try out (unless someone with a win32 environment beats me to it first). Thanks for your help narrowing this down everyone -- that's super helpful. |
That's weird because I can not reproduce it anymore - even on the same environment that bug happened before. |
@davvid , this prints correctly 42. Additional informations:
I got this output (email hidden for privacy reasons):
|
For what it's worth, I previously had a much older version of git-cola installed, so these settings in |
@davvid, , please note, that some settings are successfully saved to: guistate.mainview.toolbars, guistate.recent, guistate.mainview.lock_layout - basically anything that is not set through preferences dialog. |
For what it's worth, the old git cola successfully stored the config in |
Also, I just noticed that the windows start menu shortcut by default runs git-cola using |
Teach cola to find gitconfig on Windows when HOMEDRIVE and HOMEPATH are set in the environment. Add a new core.git_expanduser() that special-cases "~" expansion and use it when constructing the paths to ~/.gitconfig. Closes git-cola#927 Reported-by: Miron Moderau <em3@minions.org.pl> Signed-off-by: David Aguilar <davvid@gmail.com>
I may have fixed this in the That code is untested since I won't hit that code path in my environment. Please try it out and let me know if it's better behaved. If so I'll merge the fix in promptly. |
Teach cola to find gitconfig on Windows when HOMEDRIVE and HOMEPATH are set in the environment. Add a new core.git_expanduser() that special-cases "~" expansion and use it when constructing the paths to ~/.gitconfig. Closes git-cola#927 Reported-by: Miron Moderau <em3@minions.org.pl> Signed-off-by: David Aguilar <davvid@gmail.com>
@davvid Hi! I wanted to contribute to this code, and when I came upon this issue. I checked the preferences and it seems to be solved. The changes made are saved. But I am unable to check if a change like "Insert spaces instead of tabs" is actually reflecting in the editor as I am unable to configure it properly. Could you guide me on how I can? I tried configuring in the preferences but it did not work. |
Sure thing. That setting is related the commit message editor. Go into a test repo and create a commit and try inserting "tab" in the commit message editor. When you later inspect the commit message with It's a pretty subtle thing to notice. If you Let me know if that setting is working for you. I don't use windows so I very much appreciate help from windows users who can help clarify the instructions or improve the windows edge cases. |
the per-repo Through The other configuration mechanism is the If you see issues, please try testing the One note is that perhaps the edge case is when HOMEPATH or HOMEDRIVE are defined. If you don't have those set in your environment then you may not be able to reproduce the issue. Just a guess, though. Let me know if you have any questions. I kinda forgot about this issue, but the branch is still there. I'm super curious to know whether the changes in that branch are related. |
Teach cola to find gitconfig on Windows when HOMEDRIVE and HOMEPATH are set in the environment. Add a new core.git_expanduser() that special-cases "~" expansion and use it when constructing the paths to ~/.gitconfig. Closes git-cola#927 Reported-by: Miron Moderau <em3@minions.org.pl> Signed-off-by: David Aguilar <davvid@gmail.com>
In case anyone wants to test the latest version of the proposed patch, I've updated it and have repushed the windows-gitconfig branch to my
If a Windows user is still having issues and can test this branch and verify that it fixes their issues then I'll merge it. |
I just rewrote the config reader to be path-agnostic. The new implementation ensures that cola can always read gitconfig-provided configuration values. Please see the 2c77ba5 for more details. The next release (v4.0.3 or newer) will contain the fix. Please test the latest from git. |
https://build.opensuse.org/request/show/1035308 by user marcinbajor + dimstar_suse - Update to 4.0.3 - Usability, bells and whistles * The branches widget no longer loses its selection state in response to notifications and UI actions. git-cola/git-cola#1221 * The use of ``gravatar.com`` to fetch icons associated with author emails can now be disabled by setting `git config --global cola.gravatar false`. git-cola/git-cola#933 - Fixes * The config reader has been revamped to better read settings when git config files are located in unexpected locations. git-cola/git-cola#927 git-cola/git-cola#1264 * The preferences dialog no longer throws an error when the editor has not been configured. git-cola/git-cola#1263 * Context menu ac
Whenever I edit Settings in preferences window ("Insert spaces instead of tabs", "Editor" etc.) the values are not saved. Closing the Preferences dialog and re-opening it shows the old (default) values.
My system is Windows 10. I installed git-cola using the provided installer.
Home directory settings (enforced by company IT):
Git cola version is 3.3.
The text was updated successfully, but these errors were encountered: