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-bindir is being ignored on Windows #1258
Comments
This has been a curiosity for me, but I'll need your help diagnosing this. I think this is basically a duplicate of #927 . If you could kindly hop over there and diagnose what The relevant code is in In case you just need something working, I just pushed a fix that makes cola honor Thanks for the heads-up. If you can help with testing in #927 then I'd be open to resurrecting the old patch that I whipped up in that issue, but I don't want to bifurcate the threads so I'm closing this issue. There wasn't anyone available to test it, so I wasn't comfortable applying the patch that I worked on back then, but if you're able to run from git and test stuff out then we can probably get this sorted pretty easily. |
Allow users to control where git-cola looks for git-bindir by supporting the XDG_CONFIG_HOME environment variable. Related-to: git-cola#1258 Signed-off-by: David Aguilar <davvid@gmail.com>
I ran it: >>> import os
>>> os.path.expanduser('~/.config/git-cola/git-bindir')
'C:\\Users\\ziltenerd/.config/git-cola/git-bindir' So it is in the same directory as the |
I've tried setting XDG_CONFIG_HOME to |
Quick question: are you launching cola from the shell or from the shortcut icon? I'm reading through the code and our The launcher icons all go through Let me know if you're launching it a different way. If so we probably just need to adjust where we do that initialization |
I've been starting it from the shortcut icon so far. |
We have been running into configuraiton issues on platforms where the .gitconfig might be stored in a location that is opaque and unknown to cola a-priori. The root cause is that we read each config file separately, with three different "git config --file ..." calls, and this logic requires that we know *exactly* which config files we are going to read. Another downside to reading the config files one-at-a-time is that it requires three calls to "git". Rework the config reader so that it reads all of the configuration using a single call to "git config --show-origin --show-scope --list". "git config" will output the file paths that it reads when run this way, which alleviates cola from needing to know about the paths itself. Furthermore, this ensures that we will read the config value in all situations. The file paths are still used to maintain a cache (to prevent repeated calls to "git config") but they are no longer necessary for reading the values. Closes git-cola#927 Related-to: git-cola#1258 Related-to: git-cola#1263 Signed-off-by: David Aguilar <davvid@gmail.com>
Thanks for those details -- I was hoping that 4726cd5 might help because maybe we weren't always adding the configured In any case, I've adjusted the logic so that this code path is always active. I kinda doubt that'll make a difference. The other thing that changed is that the config reader was just rewritten to ensure that we can always read gitconfig-provided configuration values. The fixes in #927 seemed related because they both involve reading from Thus, I've re-opened this issue since what we're hitting here seems unique. This is a bit surprising. All we're really doing is reading All of the points to inspect are in
We only consider The other place it could fail is in Here's a some other details that might help out. Earlier you mentioned that you could set environment variables (XDG_CONFIG_HOME). If you can do that, are you able to prepend to Alternatively, I noticed that we do support one other environment variable in
If you define In theory we should be able to get this working by messing with just the Can you try using that environment variable to see if it helps? Note that you will need to launch from a Git Bash shell in order for it to pickup your shell environment. Are you able to run from the source tree? If so it'd be worth testing the latest from git in case the recent fixes helped in some way, but Thanks again for trying this stuff out. |
|
Since I currently have the misfortune of having to use Windows (and at that one without admin rights) I installed both Git and Git-Cola there. Unfortunately Git doesn't stay on the path, so as advised in the error dialog box, I tried creating the git-bindir file with the following content:
I created it both at the
C:\Users\ziltenerd\.config\git-cola
directory that gets auto-created as well as atC:\Users\ziltenerd\AppData\Roaming\.config\git-cola
. Both had no effect at all.The text was updated successfully, but these errors were encountered: