Package hudson.plugins.git
Class GitObject
java.lang.Object
hudson.plugins.git.GitObject
- All Implemented Interfaces:
Serializable
An object in a git repository. Includes the SHA1 and name of the
object stored in git (tag, branch, etc.).
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether some other object is "equal to" this one.getName()
Returns the name of this git object (branch name, tag name, etc.).org.eclipse.jgit.lib.ObjectId
getSHA1()
Returns the SHA1 hash of this git object as anObjectId
.Returns the SHA1 hash of this git object as a String.int
hashCode()
Returns a hash code value for the object.
-
Constructor Details
-
GitObject
Constructor for GitObject, a named SHA1 (tag, branch, etc.).- Parameters:
name
-String
name of this objectsha1
-ObjectId
which uniquely identifies this object
-
-
Method Details
-
getSHA1
public org.eclipse.jgit.lib.ObjectId getSHA1()Returns the SHA1 hash of this git object as anObjectId
.- Returns:
ObjectId
SHA1 of the object.
-
getName
Returns the name of this git object (branch name, tag name, etc.).- Returns:
String
name of the object.
-
getSHA1String
Returns the SHA1 hash of this git object as a String.- Returns:
String
SHA1 of the object.
-
hashCode
public int hashCode()Returns a hash code value for the object. Considers sha1 and name in the calculation. -
equals
Indicates whether some other object is "equal to" this one. Includes sha1 and name in the comparison. Objects of subclasses of this object are not equal to objects of this class, even if they add no fields.
-