Browse Source

Merge branch 'stable-5.6'

* stable-5.6:
  Hooks: avoid problems with backslashes in paths

Change-Id: Ia9e4aca11de5a465b60898a37441a17133f6355b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-5.7
Matthias Sohn 5 years ago
parent
commit
9e6f09c700
  1. 2
      org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java
  2. 2
      org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java

2
org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java

@ -261,7 +261,7 @@ public class FS_POSIX extends FS {
List<String> argv = new ArrayList<>(4 + args.length); List<String> argv = new ArrayList<>(4 + args.length);
argv.add("sh"); //$NON-NLS-1$ argv.add("sh"); //$NON-NLS-1$
argv.add("-c"); //$NON-NLS-1$ argv.add("-c"); //$NON-NLS-1$
argv.add(cmd + " \"$@\""); //$NON-NLS-1$ argv.add("$0 \"$@\""); //$NON-NLS-1$
argv.add(cmd); argv.add(cmd);
argv.addAll(Arrays.asList(args)); argv.addAll(Arrays.asList(args));
ProcessBuilder proc = new ProcessBuilder(); ProcessBuilder proc = new ProcessBuilder();

2
org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java

@ -149,7 +149,7 @@ public class FS_Win32_Cygwin extends FS_Win32 {
List<String> argv = new ArrayList<>(4 + args.length); List<String> argv = new ArrayList<>(4 + args.length);
argv.add("sh.exe"); //$NON-NLS-1$ argv.add("sh.exe"); //$NON-NLS-1$
argv.add("-c"); //$NON-NLS-1$ argv.add("-c"); //$NON-NLS-1$
argv.add(cmd + " \"$@\""); //$NON-NLS-1$ argv.add("$0 \"$@\""); //$NON-NLS-1$
argv.add(cmd); argv.add(cmd);
argv.addAll(Arrays.asList(args)); argv.addAll(Arrays.asList(args));
ProcessBuilder proc = new ProcessBuilder(); ProcessBuilder proc = new ProcessBuilder();

Loading…
Cancel
Save