From 3ceb4fac23fe175fb0ef51977bdb67847986f992 Mon Sep 17 00:00:00 2001 From: Robin Rosenberg Date: Fri, 28 Oct 2011 14:58:32 +0200 Subject: [PATCH] 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 --- .../src/org/eclipse/jgit/util/FS_Win32_Cygwin.java | 13 ++++++++----- 1 file 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 e5e97c5fb..ee83c65f8 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 @@ public FS newInstance() { } 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); }