aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Schuberth <sschuberth@gmail.com>2015-05-19 11:43:30 +0200
committerSebastian Schuberth <sschuberth@gmail.com>2015-05-22 09:37:35 +0200
commitd7a44736ce461ee7c7a5cf30cb9c705ebeb2c800 (patch)
tree86d745e5406ca6e40d8ea22e8ade05ea0bb4cd88
parentd9ffc03837e1c4ed39e3d9ebb12e05fb9e45be82 (diff)
downloadjgit-d7a44736ce461ee7c7a5cf30cb9c705ebeb2c800.tar.gz
jgit-d7a44736ce461ee7c7a5cf30cb9c705ebeb2c800.zip
FS: Remove the gitprefix logic
The only purpose of the gitprefix logic was to determine the path to the system-wide config file. This is now done by discoverGitSystemConfig() independent of the gitprefix, so get rid of this unused code. Change-Id: Iaa88df9bd066dc1ed4067c18618af809e49876b3 Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
-rw-r--r--README.md6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java35
2 files changed, 3 insertions, 38 deletions
diff --git a/README.md b/README.md
index 5a729fd910..333fa289ff 100644
--- a/README.md
+++ b/README.md
@@ -94,9 +94,9 @@ Warnings/Caveats
Git is installed. Make sure Git can be found via the PATH
environment variable. When installing Git for Windows check the "Run
Git from the Windows Command Prompt" option. There are other options
- like the jgit.gitprefix system property or Eclipse settings that can
- be used for pointing out where C Git is installed. Modifying PATH is
- the recommended option if C Git is installed.
+ like Eclipse settings that can be used for pointing out where C Git
+ is installed. Modifying PATH is the recommended option if C Git is
+ installed.
- We try to use the same notation of $HOME as C Git does. On Windows
this is often not the same value as the user.home system property.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
index f61606e48e..3cd9358212 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
@@ -157,8 +157,6 @@ public abstract class FS {
private volatile Holder<File> userHome;
- private volatile Holder<File> gitPrefix;
-
/**
* Constructs a file system abstraction.
*/
@@ -174,7 +172,6 @@ public abstract class FS {
*/
protected FS(FS src) {
userHome = src.userHome;
- gitPrefix = src.gitPrefix;
}
/** @return a new instance of the same type of FS. */
@@ -517,21 +514,6 @@ public abstract class FS {
return null;
}
- /** @return the $prefix directory C Git would use. */
- public File gitPrefix() {
- Holder<File> p = gitPrefix;
- if (p == null) {
- String overrideGitPrefix = SystemReader.getInstance().getProperty(
- "jgit.gitprefix"); //$NON-NLS-1$
- if (overrideGitPrefix != null)
- p = new Holder<File>(new File(overrideGitPrefix));
- else
- p = new Holder<File>(discoverGitPrefix());
- gitPrefix = p;
- }
- return p.value;
- }
-
/**
* @return the path to the Git executable.
* @since 4.0
@@ -563,11 +545,6 @@ public abstract class FS {
return new File(w);
}
- /** @return the $prefix directory C Git would use. */
- protected File discoverGitPrefix() {
- return resolveGrandparentFile(discoverGitExe());
- }
-
/**
* @param grandchild
* @return the parent directory of this file's parent directory or
@@ -584,18 +561,6 @@ public abstract class FS {
}
/**
- * Set the $prefix directory C Git uses.
- *
- * @param path
- * the directory. Null if C Git is not installed.
- * @return {@code this}
- */
- public FS setGitPrefix(File path) {
- gitPrefix = new Holder<File>(path);
- return this;
- }
-
- /**
* Check if a file is a symbolic link and read it
*
* @param path