public class TrackingRefUpdate
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) class |
TrackingRefUpdate.Command |
Modifier and Type | Field and Description |
---|---|
private ReceiveCommand |
cmd |
(package private) boolean |
forceUpdate |
(package private) java.lang.String |
localName |
(package private) ObjectId |
newObjectId |
(package private) ObjectId |
oldObjectId |
private java.lang.String |
remoteName |
private RefUpdate.Result |
result |
Constructor and Description |
---|
TrackingRefUpdate(boolean canForceUpdate,
java.lang.String remoteName,
java.lang.String localName,
AnyObjectId oldValue,
AnyObjectId newValue) |
Modifier and Type | Method and Description |
---|---|
ReceiveCommand |
asReceiveCommand()
Get this update wrapped by a ReceiveCommand.
|
java.lang.String |
getLocalName()
Get the name of the local tracking ref.
|
ObjectId |
getNewObjectId()
Get the new value the ref will be (or was) updated to.
|
ObjectId |
getOldObjectId()
The old value of the ref, prior to the update being attempted.
|
java.lang.String |
getRemoteName()
Get the name of the remote ref.
|
RefUpdate.Result |
getResult()
Get the status of this update.
|
(package private) void |
setResult(RefUpdate.Result result) |
java.lang.String |
toString() |
private final java.lang.String remoteName
final java.lang.String localName
boolean forceUpdate
ObjectId oldObjectId
ObjectId newObjectId
private RefUpdate.Result result
private ReceiveCommand cmd
TrackingRefUpdate(boolean canForceUpdate, java.lang.String remoteName, java.lang.String localName, AnyObjectId oldValue, AnyObjectId newValue)
public java.lang.String getRemoteName()
Usually this is of the form "refs/heads/master".
public java.lang.String getLocalName()
Usually this is of the form "refs/remotes/origin/master".
public ObjectId getNewObjectId()
public ObjectId getOldObjectId()
This value may differ before and after the update method. Initially it is populated with the value of the ref before the lock is taken, but the old value may change if someone else modified the ref between the time we last read it and when the ref was locked for update.
public RefUpdate.Result getResult()
void setResult(RefUpdate.Result result)
public ReceiveCommand asReceiveCommand()
public java.lang.String toString()
toString
in class java.lang.Object