Community
Participate
Working Groups
Hi, In version "org.eclipse.jgit/2.3.1.201302201838-r", parameters defined in system configuration file "/etc/gitconfig" are not taken into account by jgit. For example, "receive.denyNonFastForwards=true" is not honored. The cmd line client "git" is installed under /usr/bin/git. We do not have any others installation of git on this machine. "git config -l" is able to read all these parameters. My guess is that jgit is not able to find installation path of "git" but i don't know why? BR Jérôme
The man page for git says the system wide configuration is $(prefix)/etc/gitconfig, so that's how we look for it. This is apparently not true.
Meanwhile, set the system property jgit.gitprefix=/
Maybe I should add that I don't know a clean/reliable way of finding the prefix that the command line Git uses.
FYI, I have a proposed fix for this pending at [1]. I'd appreciate a review. [1] https://git.eclipse.org/r/#/c/48146/
merged as http://git.eclipse.org/c/jgit/jgit.git/commit/?id=d9ffc03837e1c4ed39e3d9ebb12e05fb9e45be82