Package org.eclipse.jgit.transport
Class TrackingRefUpdate
java.lang.Object
org.eclipse.jgit.transport.TrackingRefUpdate
Update of a locally stored tracking branch.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ReceiveCommand
(package private) boolean
(package private) final String
(package private) ObjectId
(package private) ObjectId
private final String
private RefUpdate.Result
-
Constructor Summary
ConstructorsConstructorDescriptionTrackingRefUpdate
(boolean canForceUpdate, String remoteName, String localName, AnyObjectId oldValue, AnyObjectId newValue) -
Method Summary
Modifier and TypeMethodDescriptionGet this update wrapped by a ReceiveCommand.Get the name of the local tracking ref.Get the new value the ref will be (or was) updated to.The old value of the ref, prior to the update being attempted.Get the name of the remote ref.Get the status of this update.(package private) void
setResult
(RefUpdate.Result result) toString()
-
Field Details
-
Constructor Details
-
TrackingRefUpdate
TrackingRefUpdate(boolean canForceUpdate, String remoteName, String localName, AnyObjectId oldValue, AnyObjectId newValue)
-
-
Method Details
-
getRemoteName
Get the name of the remote ref.Usually this is of the form "refs/heads/master".
- Returns:
- the name used within the remote repository.
-
getLocalName
Get the name of the local tracking ref.Usually this is of the form "refs/remotes/origin/master".
- Returns:
- the name used within this local repository.
-
getNewObjectId
Get the new value the ref will be (or was) updated to.- Returns:
- new value. Null if the caller has not configured it.
-
getOldObjectId
The old value of the ref, prior to the update being attempted.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.
- Returns:
- the value of the ref prior to the update being attempted.
-
getResult
Get the status of this update.- Returns:
- the status of the update.
-
setResult
-
asReceiveCommand
Get this update wrapped by a ReceiveCommand.- Returns:
- this update wrapped by a ReceiveCommand.
- Since:
- 3.4
-
toString
-