Closed ideologysec closed 2 years ago
@ideologysec, before diving into a subject of XDG_CONFIG_HOME settings, can you tell me which version of Kaleidoscope (since I see that in your config file) do you use?
I'm using the latest, v3.0.2.
Checking, it appears there's a newer v3.1; I can update later today and test but I doubt it will make much of a difference.
@ideologysec, no that won't make any difference. It seems that going from v2 to v3, Kaleidoscope changed its bundle identifier (along with changing owners), which GitFinder doesn't recognise. That has nothing to do with XDG_CONFIG_HOME settings and later today I'll upload a beta version, which should solve this problem. I'll let you know once it's available.
Regarding your configuration files(s)… XDG_CONFIG_HOME is not important for now, as it doesn't seem to be used at all in your case. But tell me, since you have your ~/.gitconfig
symlinked to ~/Developer/dotfiles/.gitspecialconf
, when you started GitFinder and tried to see some repository, did you see an error dialog similar to this:
If so, have you selected your target file at ~/Developer/dotfiles/.gitspecialconf
after this dialog was shown? If you don't remember that, can you do this in the terminal:
defaults read ag.zigz.GitFinder
… and check in the output if you see this key defined:
GFConfigTargetURL = {length = …, bytes = … … … … };
Can you please answer these questions above?
That makes sense, thanks. :)
I did not ever see an error dialog such as that one, nor did I have to select it. I suspect it's because my repos all live in ~/Developer, including my dotfiles repo, and I already granted GitFinder access to that entire folder so it could work with all my repos.
Oh right. That error dialog appears only if a symlinked target file is outside of GitFinder sandbox environment. Coming with a new beta soon, then we'll handle XDG_CONFIG_HOME, which doesn't influence you, but it'd be good to explain why the error you see happens. Perhaps it will be useful to someone else as well.
@ideologysec, I've just uploaded a new beta version 1.7.4b3 (build 116). You can download it directly here, but you can also update your current copy to in using in-app updater, just choose Beta release channel and then follow the regular update procedure:
Let me know if this beta version allows you to select Kaleidoscope v3 as your diff (and merge) tool.
Works!
Also actual invocation of Kaleidoscope for external diff works?
After I installed the "tools" script, yes it did.
@ideologysec, yeah, every time I change that script (which invokes diff/merge tools), it has to be "installed" again. But GitFinder recognises that and ask you to (re)install it automatically.
@ideologysec, this fix is now officially available in the form of a new official version 1.7.4 (build 117). However, at the beginning of this thread we touched the subject of XDG_CONFIG_HOME environment variable and the error you got trying to set it, so I'd like to explain it a bit, it may be helpful to someone else, getting the same error.
XDG_CONFIG_HOME environment variable is a part of XDG Base Directory Specification, and it's purpose is define a single folder, where all user configuration files for different command line tools are located. Here it states:
$XDG_CONFIG_HOME
defines the base directory relative to which user-specific configuration files should be stored. If$XDG_CONFIG_HOME
is either not set or empty, a default equal to$HOME/.config
should be used.
Core-git (official git version) respect this configuration setting and in case a user has XDG_CONFIG_HOME defined, git reads/writes configuration settings in $XDG_CONFIG_HOME/git/config
file. As a proper Git client, GitFinder does the same. However, since GitFinder is fully sandboxed application, it can't access XDG git configuration file if XDG_CONFIG_HOME is set somewhere different than the default $HOME/.config
location.
If you haven't set XDG_CONFIG_HOME environment variable, or it's empty, the default location $HOME/.config
is used and GitFinder can access and use it, as it is automatically included in its sandbox environment. However, if you have a custom value for XDG_CONFIG_HOME (different than $HOME/.config
), GitFinder cannot access that custom location automatically and you will have to select it in Git Configuration… > General, so that GitFinder can include selected location in its sandboxed environment. GitFinder will detect this case and will inform you. For example, I set XDG_CONFIG_HOME to $HOME/.myconfig
and here is what GitFinder shows:
GitFinder now expects you to select a folder at path /Users/milke/.myconfig
and if you select anything else, it will show an error:
This is exactly the same error you saw. In your case, the XDG_CONFIG_HOME environment variable is not set at all (so the default $HOME/.config
is used), yet you want to select something else and hence you get that error. I hope it's clear what I'm talking about here. The only thing to fix here is that misleading "folder at path "(null)"," in the error message and I'll fix it in the next update.
Another important note here: environment variables for macOS GUI applications cannot be set simply by executing export ENVAR="value"
in the terminal. That works only for command line (terminal) applications/tools. For GUI applications, you need to use launchctl
command. A nice breakdown of that method can be found here.
If anything about XDG_CONFIG_HOME (and environment variables for GUI applications) is still unclear, please let me know.
@ideologysec, since this has been resolved, and I also put some additional explanations regarding XDG_CONFIG_HOME environment variable, I'm closing this.
When I open GitFinder to configure the Diff & Merge tools under General in Git Configuration, XDG_CONFIG_HOME is set to
/Users/username/.config
which is all well and good. But, I can't set the diff or merge tools; my only option is "Select tool" which is already checked. I have a~/.config
folder in my home directory, but I have no git folder in there; I keep my git config in my personal repo elsewhere as mentioned above. Whenever I try to set the path for XDG_CONFIG, I get this error:Here's my git setup:
~/.gitconfig
is a symlink to~/Developer/dotfiles/.gitspecialconf
, and I haveinside the symlinked gitconfig.
I also already have Kaleidoscope set up as the diff & merge tools inside that gitconfig:
What are my next steps for troubleshooting or resolution?