aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorRobin Rosenberg <robin.rosenberg@dewire.com>2011-10-28 14:58:32 +0200
committerSystemConfig <robin.rosenberg@dewire.com>2011-10-28 14:58:32 +0200
commit3ceb4fac23fe175fb0ef51977bdb67847986f992 (patch)
tree216d3bd625a0e6c42872142bbead98df3ddab272 /org.eclipse.jgit
parentb6281cac01858b93b856b80d80c4dd4b915f0502 (diff)
downloadjgit-3ceb4fac23fe175fb0ef51977bdb67847986f992.tar.gz
jgit-3ceb4fac23fe175fb0ef51977bdb67847986f992.zip
Do not resolve path using cygwin unless told to
The system property jgit.cygpath must be set to true in order for cygwin's cygpath to be used to translate path from cygwin namespace to Windows namespace. The cygwin path translation should be considered deprecated. Bug: 353389 Change-Id: I2b5234c0ab936dac67d1e232f4cd28331bf3226d Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java
index e5e97c5fb9..ee83c65f8b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java
@@ -81,11 +81,14 @@ class FS_Win32_Cygwin extends FS_Win32 {
}
public File resolve(final File dir, final String pn) {
- String w = readPipe(dir, //
- new String[] { cygpath, "--windows", "--absolute", pn }, //
- "UTF-8");
- if (w != null)
- return new File(w);
+ String useCygPath = System.getProperty("jgit.usecygpath");
+ if (useCygPath != null && useCygPath.equals("true")) {
+ String w = readPipe(dir, //
+ new String[] { cygpath, "--windows", "--absolute", pn }, //
+ "UTF-8");
+ if (w != null)
+ return new File(w);
+ }
return super.resolve(dir, pn);
}