forked from danielflower/multi-module-maven-release-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
32 changed files
with
301 additions
and
51 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
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
48 changes: 48 additions & 0 deletions
48
src/main/java/com/github/danielflower/mavenplugins/release/RefWithCommitId.java
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package com.github.danielflower.mavenplugins.release; | ||
|
||
import org.eclipse.jgit.lib.ObjectId; | ||
import org.eclipse.jgit.lib.Ref; | ||
|
||
public final class RefWithCommitId | ||
{ | ||
private final Ref ref; | ||
private final ObjectId commitId; | ||
|
||
public RefWithCommitId(Ref ref, ObjectId commitId) { | ||
Guard.notNull("ref", ref); | ||
Guard.notNull("commitId", commitId); | ||
this.ref = ref; | ||
this.commitId = commitId; | ||
} | ||
|
||
public Ref getRef() { | ||
return ref; | ||
} | ||
|
||
|
||
|
||
public ObjectId getCommitObjectId() { | ||
return commitId; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "RefWithCommitId{" + | ||
"ref='" + ref.toString() + '\'' + | ||
", commitId=" + commitId.toString() + | ||
'}'; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
RefWithCommitId that = (RefWithCommitId) o; | ||
return ref.equals(that.ref); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return ref.hashCode(); | ||
} | ||
} |
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.