diff options
author | Thomas Wolf <twolf@apache.org> | 2024-03-07 22:42:27 +0100 |
---|---|---|
committer | Thomas Wolf <twolf@apache.org> | 2024-03-07 22:58:20 +0100 |
commit | 819c5bcc8b2a2685c20e5b8e568f776b19f7db63 (patch) | |
tree | 3d9401e4e5737853d82303f784cc40395f6f9c00 /org.eclipse.jgit | |
parent | 24307bd387d1872d4892e7ad977d124f9184547a (diff) | |
download | jgit-819c5bcc8b2a2685c20e5b8e568f776b19f7db63.tar.gz jgit-819c5bcc8b2a2685c20e5b8e568f776b19f7db63.zip |
[diffmergetool] Fix running command on Cygwin
Because FS_Win32_Cygwin is a subclass of FS_Win32 the "instanceof" test
for Cygwin must come first.
Bug: jgit-34
Change-Id: If0cc0fa77e7aa0ce680289cecf808bc8859911a1
Signed-off-by: Thomas Wolf <twolf@apache.org>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/CommandExecutor.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/CommandExecutor.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/CommandExecutor.java index 25b7b8e5ba..c64a844af1 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/CommandExecutor.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/CommandExecutor.java @@ -165,6 +165,9 @@ public class CommandExecutor { if (fs instanceof FS_POSIX) { commandArray = new String[1]; commandArray[0] = commandFile.getCanonicalPath(); + } else if (fs instanceof FS_Win32_Cygwin) { + commandArray = new String[1]; + commandArray[0] = commandFile.getCanonicalPath().replace("\\", "/"); //$NON-NLS-1$ //$NON-NLS-2$ } else if (fs instanceof FS_Win32) { if (useMsys2) { commandArray = new String[3]; @@ -176,9 +179,6 @@ public class CommandExecutor { commandArray = new String[1]; commandArray[0] = commandFile.getCanonicalPath(); } - } else if (fs instanceof FS_Win32_Cygwin) { - commandArray = new String[1]; - commandArray[0] = commandFile.getCanonicalPath().replace("\\", "/"); //$NON-NLS-1$ //$NON-NLS-2$ } else { throw new ToolException( "JGit: file system not supported: " + fs.toString()); //$NON-NLS-1$ |