diff options
author | Robin Rosenberg <robin.rosenberg@dewire.com> | 2010-12-28 17:15:18 +0100 |
---|---|---|
committer | Robin Rosenberg <robin.rosenberg@dewire.com> | 2010-12-31 11:48:34 +0100 |
commit | 797ebba30707259f7a4bc06baa40360ab79d2ff8 (patch) | |
tree | ea089758d503ecacccdd0adfa409c292681f3c71 /org.eclipse.jgit.test/tst/org/eclipse | |
parent | 240769e023c4ea6c8394c25d58fdca7f0bb82948 (diff) | |
download | jgit-797ebba30707259f7a4bc06baa40360ab79d2ff8.tar.gz jgit-797ebba30707259f7a4bc06baa40360ab79d2ff8.zip |
Add support for getting the system wide configuration
These settings are stored in <prefix>/etc/gitconfig. The C Git
binary is installed in <prefix>/bin, so we look for the C Git
executable to find this location, first by looking at the PATH
environment variable and then by attemting to launch bash as
a login shell to find out.
Bug: 333216
Change-Id: I1bbee9fb123a81714a34a9cc242b92beacfbb4a8
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java index eb9f03c550..65d1b6e24e 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java @@ -120,7 +120,8 @@ public class ConfigTest extends TestCase { final MockSystemReader mockSystemReader = new MockSystemReader(); SystemReader.setInstance(mockSystemReader); final String hostname = mockSystemReader.getHostname(); - final Config userGitConfig = mockSystemReader.openUserConfig(FS.DETECTED); + final Config userGitConfig = mockSystemReader.openUserConfig(null, + FS.DETECTED); final Config localConfig = new Config(userGitConfig); mockSystemReader.clearProperties(); |