Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into
JENKINS-25444-fetch-clean Conflicts: src/main/java/org/jenkinsci/plugins/gitclient/JGitAPIImpl.java src/test/java/org/jenkinsci/plugins/gitclient/GitAPITestCase.java
- Loading branch information
Showing
5 changed files
with
327 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
package hudson.plugins.git; | ||
|
||
import org.eclipse.jgit.lib.Constants; | ||
import org.eclipse.jgit.lib.ObjectId; | ||
import org.eclipse.jgit.lib.Ref; | ||
|
||
public class Branch extends GitObject { | ||
private static final long serialVersionUID = 1L; | ||
|
||
public Branch(String name, ObjectId sha1) { | ||
super(name, sha1); | ||
} | ||
|
||
public Branch(Ref candidate) { | ||
super(strip(candidate.getName()), candidate.getObjectId()); | ||
} | ||
|
||
private static String strip(String name) { | ||
return name.substring(name.indexOf('/', 5) + 1); | ||
} | ||
|
||
public @Override String toString() { | ||
return "Branch " + name + "(" + sha1 + ")"; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.