|
|
|
|
|
Re: JGIT-CLI@linux config --list: ERROR FS:512 - fatal: Could not switch to '/usr/local/git/etc/': N [message #1715882 is a reply to message #1715853] |
Fri, 27 November 2015 08:00 |
Christian Halstrick Messages: 274 Registered: July 2009 |
Senior Member |
|
|
Ideally you should not have to look at different config files when switching implementations. Our goal is that JGit looks at exactly the same files as native git. The document defining this is https://www.kernel.org/pub/software/scm/git/docs/git-config.html#FILES. Whenever we look with JGit at different files I think thats a bug and should be fixed if possible. But JGit developers have the same problem: How to determine the path of e.g. the system wide config file when running on windows. For that JGit calls "GIT_EDITOR=echo git config --system --edit" to determine that path.
Currently JGit doesn't support to tell you from which config file a certain effective config setting was taken. JGit doesn't even tell you where systemConfig and globalConfig are located. But this could be added. Maybe you want to contribute that? Extensions to FileBasedConfig.java could reveal the base config file for a certain config. And an utility method based on that could determine from where a certain config setting is taken.
Ciao
Chris
|
|
|
Powered by
FUDForum. Page generated in 0.03502 seconds