|[jgit-dev] Custom FS is used not everywhere|
Hi. I’ve noticed that it is possible to set a custom instance of the FS to the FileRepositoryBuilder, which is then propagated to a number of JGit commands and classes. But unfortunately it seems that there are places when this FS is not used. For example, the SystemReader, being a singleton, uses FS.DETECTED which effectively eliminates the purpose of a custom FS. For example, I face the following problem. I try to prevent JGit accessing the ~/.gitconfig in the user home. I tried providing a custom FS to solve the issue, but it doesn’t work because Repository.getConfig() calls SystemReader.getUserConfig() which delegates the call to FS.DETECTED. Could you please clarify: is it a bug that the custom FS is not used everywhere, or is it intentional that some places still use the static FS instance? Thanks a lot in advance, -- Kirill.
Back to the top