Skip to content

Commit

Permalink
Merge pull request #71 from vjuranek/JENKINS-13007
Browse files Browse the repository at this point in the history
[FIXED JENKINS-13007] Handle special meaning of some charactes on Window...
  • Loading branch information
ndeloof committed Jun 3, 2012
2 parents cef9941 + 938ca81 commit db53cce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/hudson/plugins/git/GitAPI.java
Expand Up @@ -2,6 +2,7 @@

import hudson.EnvVars;
import hudson.FilePath;
import hudson.Functions;
import hudson.Launcher;
import hudson.FilePath.FileCallable;
import hudson.Launcher.LocalLauncher;
Expand Down Expand Up @@ -251,7 +252,8 @@ public void clean() throws GitException {
}

public ObjectId revParse(String revName) throws GitException {
String result = launchCommand("rev-parse", revName + "^{commit}");
String rpCommit = Functions.isWindows() ? "^^\\{commit\\}" : "^{commit}";
String result = launchCommand("rev-parse", revName + rpCommit);
return ObjectId.fromString(firstLine(result).trim());
}

Expand Down

0 comments on commit db53cce

Please sign in to comment.