Top Description Inners Fields Constructors Methods
org.eclipse.jgit.transport

public Class TrackingRefUpdate

extends Object
Class Inheritance
Static Imports
org.eclipse.jgit.lib.Constants.OBJECT_ID_ABBREV_STRING_LENGTH

Update of a locally stored tracking branch.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Modifier and TypeField and Description
private ReceiveCommand
pack-priv boolean
pack-priv final String
pack-priv ObjectId
pack-priv ObjectId
private final String
private RefUpdate.Result

Constructor Summary

AccessConstructor and Description
pack-priv
TrackingRefUpdate(boolean canForceUpdate, String remoteName, String localName, AnyObjectId oldValue, AnyObjectId newValue)

Method Summary

Modifier and TypeMethod and Description
public ReceiveCommand

Returns:

this update wrapped by a ReceiveCommand.
asReceiveCommand
()

Get this update wrapped by a ReceiveCommand.

public String

Returns:

the name used within this local repository.
getLocalName
()

Get the name of the local tracking ref.

public ObjectId

Returns:

new value. Null if the caller has not configured it.
getNewObjectId
()

Get the new value the ref will be (or was) updated to.

public ObjectId

Returns:

the value of the ref prior to the update being attempted.
getOldObjectId
()

The old value of the ref, prior to the update being attempted.

public String

Returns:

the name used within the remote repository.
getRemoteName
()

Get the name of the remote ref.

public RefUpdate.Result

Returns:

the status of the update.
getResult
()

Get the status of this update.

pack-priv void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

cmdback to summary
private ReceiveCommand cmd
forceUpdateback to summary
pack-priv boolean forceUpdate
localNameback to summary
pack-priv final String localName
newObjectIdback to summary
pack-priv ObjectId newObjectId
oldObjectIdback to summary
pack-priv ObjectId oldObjectId
remoteNameback to summary
private final String remoteName
resultback to summary
private RefUpdate.Result result

Constructor Detail

TrackingRefUpdateback to summary
pack-priv TrackingRefUpdate(boolean canForceUpdate, String remoteName, String localName, AnyObjectId oldValue, AnyObjectId newValue)

Method Detail

asReceiveCommandback to summary
public ReceiveCommand asReceiveCommand()

Get this update wrapped by a ReceiveCommand.

Returns:ReceiveCommand

this update wrapped by a ReceiveCommand.

Since
3.4
getLocalNameback to summary
public String getLocalName()

Get the name of the local tracking ref.

Usually this is of the form "refs/remotes/origin/master".

Returns:String

the name used within this local repository.

getNewObjectIdback to summary
public ObjectId getNewObjectId()

Get the new value the ref will be (or was) updated to.

Returns:ObjectId

new value. Null if the caller has not configured it.

getOldObjectIdback to summary
public ObjectId 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:ObjectId

the value of the ref prior to the update being attempted.

getRemoteNameback to summary
public String getRemoteName()

Get the name of the remote ref.

Usually this is of the form "refs/heads/master".

Returns:String

the name used within the remote repository.

getResultback to summary
public RefUpdate.Result getResult()

Get the status of this update.

Returns:RefUpdate.Result

the status of the update.

setResultback to summary
pack-priv void setResult(RefUpdate.Result result)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@SuppressWarnings:nls
@Override
org.eclipse.jgit.transport back to summary

pack-priv final Class TrackingRefUpdate.Command

extends ReceiveCommand
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
private RefUpdate.Result
public void
setResult(RefUpdate.Result
the new result code for this command.
status
)

Overrides org.eclipse.jgit.transport.ReceiveCommand.setResult.

Set the result of this command.

public void
setResult(ReceiveCommand.Result
the new status code for this command.
status
)

Overrides org.eclipse.jgit.transport.ReceiveCommand.setResult.

Set the status of this command.

public void
setResult(ReceiveCommand.Result
new status code for this command.
status
,
String
optional message explaining the new status.
msg
)

Overrides org.eclipse.jgit.transport.ReceiveCommand.setResult.

Set the status of this command.

Inherited from org.eclipse.jgit.transport.ReceiveCommand:
abortdisableRefLogexecutefilterfiltergetMessagegetNewIdgetNewSymrefgetOldIdgetOldSymrefgetRefgetRefLogMessagegetRefNamegetResultgetTypehasCustomRefLogisForceRefLogisRefLogDisabledisRefLogIncludingResultisTransactionAbortedlinklinkrejectsetForceRefLogsetRefsetRefLogMessagesetTypesetTypeFastForwardUpdatetoStringunlinkupdateType

Constructor Detail

Commandback to summary
pack-priv Command()

Method Detail

canForceUpdateback to summary
pack-priv boolean canForceUpdate()
decodeback to summary
private RefUpdate.Result decode(ReceiveCommand.Result status)
setResultback to summary
public void setResult(RefUpdate.Result status)

Overrides org.eclipse.jgit.transport.ReceiveCommand.setResult.

Doc from org.eclipse.jgit.transport.ReceiveCommand.setResult.

Set the result of this command.

Parameters
status:RefUpdate.Result

the new result code for this command.

Annotations
@Override
setResultback to summary
public void setResult(ReceiveCommand.Result status)

Overrides org.eclipse.jgit.transport.ReceiveCommand.setResult.

Doc from org.eclipse.jgit.transport.ReceiveCommand.setResult.

Set the status of this command.

Parameters
status:ReceiveCommand.Result

the new status code for this command.

Annotations
@Override
setResultback to summary
public void setResult(ReceiveCommand.Result status, String msg)

Overrides org.eclipse.jgit.transport.ReceiveCommand.setResult.

Doc from org.eclipse.jgit.transport.ReceiveCommand.setResult.

Set the status of this command.

Parameters
status:ReceiveCommand.Result

new status code for this command.

msg:String

optional message explaining the new status.

Annotations
@Override