Closed wizpar closed 9 months ago
~This is not a Flatpak
issue. SmartGit
behaves like that. You can check the ZIP/TAR distribution to confirm.~
~@tmssngr (or @syntevo), do you think this is something you could take in your backlog?~
With SmartGit 23.1, I cannot reproduce any problems here. It should take into account $XDG_CONFIG_HOME/git/config
exactly as command line Git does: for every key, try to read from $HOME/.gitconfig
and fallback to $XDG_CONFIG_HOME/git/config
, if not found: https://github.com/git/git/blob/1a87c842ece327d03d08096395969aca5e0a6996/config.c#L2042
I see $XDG_CONFIG_HOME
mapped to $HOME/.var/app/com.syntevo.SmartGit/config/
, so probably that's the issue. I would need to confirm this, but if I print $XDG_CONFIG_HOME
in the Flatpak, it gives me that value, instead of $HOME/.config/
:man_shrugging:
I fixed this in #101; not sure if that's the best way, but the solution is basically creating a link to $HOME/.config/git
if it exists (and not linked already) within $HOME/.var/app/com.syntevo.SmartGit/config/
.
Description
Git configuration, by default, is stored in
$XDG_CONFIG_HOME/git/config
— at the user-level. However, SmartGit is currently unable to read the configuration from this location. Instead, it only reads the config from$HOME/.gitconfig
.According to the official Git documentation, Git should prioritize reading configuration from
$XDG_CONFIG_HOME/git/config
before falling back to other locations.Steps to Reproduce
$XDG_CONFIG_HOME/git/config
Current Behavior
SmartGit does not recognize configurations set in
$XDG_CONFIG_HOME/git/config
, relying solely on$HOME/.gitconfig
.Additional Information
N/A