fix(git_config): Delta now respects env vars (fixes #1971)
This change replaces git2::Repository::discover() with git2::Repository::open_from_env(), which seems to correctly respect the GIT_CONFIG_SYSTEM and GIT_CONFIG_GLOBAL environment variables. (and by extenstion OP's problem? havent checked)
I haven’t done extensive testing, but this change resolves the issue I was seeing. As far as I can tell, the core behavior is preserved, but I trust that a reviewer with more experience would be able to confirm.
I went and attempted in testing OP's original problem and it seems to work on the unpatched version.
I only have $XDG_CONFIG_DIRS variable defined on my system, but options added to ~/.config/git/config were picked up by delta. So the issue might've been resolved earlier or the variable they were specifying $XDG_CONFIG_HOME was the problem? Or git2-rs checks $HOME/.config/git/config by default? I'm honestly not certain.