org.eclipse.jgit.transport.ReceivePack .
This command instance roughly translates to the server side representation of
the org. created by the client.
| Modifier and Type | Class and Description |
|---|---|
| public static enum | ReceiveCommand.
Result of the update command. |
| public static enum | ReceiveCommand.
Type of operation requested. |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private Boolean | |
| private String | |
| private final String | |
| private final ObjectId | |
| private final String | |
| private final ObjectId | |
| private final String | |
| private Ref | |
| private boolean | |
| private String | |
| private ReceiveCommand. | |
| private ReceiveCommand. | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | ReceiveCommand(final ObjectId
the expected old object id; must not be null. Use
oldId, final ObjectId org. to indicate a
ref creation.the new object id; must not be null. Use
newId, final String org. to indicate a
ref deletion.name of the ref being affected. name)Create a new command for
|
| public | ReceiveCommand(final ObjectId
the old object id; must not be null. Use
oldId, final ObjectId org. to indicate a
ref creation.the new object id; must not be null. Use
newId, final String org. to indicate a
ref deletion.name of the ref being affected. name, final ReceiveCommand.type of the command. Must be
typeorg.
if oldId is zero, or
org.
if newId is zero.Create a new command for
|
| private | ReceiveCommand(ObjectId
the old object id; must not be null. Use
oldId, String ObjectId#zeroId() to indicate a ref creation.new target, must begin with newSymref, String "refs/". Use null
to indicate a ref deletion.name of the reference to make symbolic. name)Create a command to switch a reference from object to symbolic. |
| private | ReceiveCommand(String
expected old target. Use oldSymref, ObjectId null to indicate a ref
creation.the new object id; must not be null. Use
newId, String ObjectId#zeroId() to indicate a ref deletion.name of the reference to convert from symbolic. name)Create a command to switch a reference from symbolic to object. |
| private | ReceiveCommand(String
expected old target. Use oldTarget, String null to indicate a ref
creation.new target. Use newTarget, String null to indicate a ref deletion.name of the reference to make symbolic. name)Create a command to switch a symbolic reference's target. |
| Modifier and Type | Method and Description |
|---|---|
| public static void | abort(Iterable<ReceiveCommand>
commands to mark as failed. commands)Set unprocessed commands as failed due to transaction aborted. |
| public void | |
| public void | |
| public static List | Returns: a copy of the command list containing only those commands with the desired status.commands to filter. in, ReceiveCommand.desired status to filter by. wantFilter a collection of commands according to result. |
| public static List | Returns: a copy of the command list containing only those commands with the desired status.commands to filter. commands, ReceiveCommand.desired status to filter by. wantFilter a list of commands according to result. |
| public String | Returns: the message associated with a failure status.Get the message associated with a failure status. |
| public ObjectId | |
| public String | Returns: requested new target for a symbolic reference.Get requested new target for a symbolic reference. |
| public ObjectId | Returns: the old value the client thinks the ref has.Get the old value the client thinks the ref has. |
| public String | Returns: expected old target for a symbolic reference.Get expected old target for a symbolic reference. |
| public Ref | Returns: the ref, if this was advertised by the connection.Get the ref, if this was advertised by the connection. |
| public String | Returns: message the caller wants to include in the reflog; null if the update should not be logged.Get the message to include in the reflog. |
| public String | |
| public ReceiveCommand. | Returns: the current status code of this command.Get the current status code of this command. |
| public ReceiveCommand. | |
| public boolean | Returns: whether a custom reflog is set.Check whether this command has a custom reflog message setting that should
override defaults in any containing
|
| public Boolean | Returns: whether force writing is enabled;null if
#setForceRefLog(boolean) was never called.Check whether the reflog should be written regardless of repo defaults. |
| public boolean | |
| public boolean | Returns: true if the message should include the result.Check whether the reflog message should include the result of the update, such as fast-forward or force-update. |
| public static boolean | Returns: whether the command failed due to transaction aborted, as inabort(Iterable).command. cmd)Check whether a command failed due to transaction aborted. |
| public static ReceiveCommand | |
| public static ReceiveCommand | |
| pack-priv void | |
| public void | |
| pack-priv void | |
| public void | setRefLogMessage(String
the message to describe this change. If null and appendStatus is
false, the reflog will not be updated. msg, boolean true if the status of the ref change (fast-forward or
forced-update) should be appended to the user supplied message. appendStatus)Set the message to include in the reflog. |
| public void | setResult(ReceiveCommand.
the new status code for this command. sSet the status of this command. |
| public void | setResult(ReceiveCommand.
new status code for this command. s,optional message explaining the new status. m)Set the status of this command. |
| public void | |
| pack-priv void | |
| pack-priv void | |
| public String | |
| public static ReceiveCommand | |
| public void | updateType(RevWalk
an instance to perform the merge test with. The caller must
allocate and release this object. walk)Update the type of this command by checking for fast-forward. |
| customRefLog | back to summary |
|---|---|
| private boolean customRefLog | |
| forceRefLog | back to summary |
|---|---|
| private Boolean forceRefLog | |
| message | back to summary |
|---|---|
| private String message | |
| name | back to summary |
|---|---|
| private final String name | |
| newId | back to summary |
|---|---|
| private final ObjectId newId | |
| newSymref | back to summary |
|---|---|
| private final String newSymref | |
| oldId | back to summary |
|---|---|
| private final ObjectId oldId | |
| oldSymref | back to summary |
|---|---|
| private final String oldSymref | |
| ref | back to summary |
|---|---|
| private Ref ref | |
| refLogIncludeResult | back to summary |
|---|---|
| private boolean refLogIncludeResult | |
| refLogMessage | back to summary |
|---|---|
| private String refLogMessage | |
| status | back to summary |
|---|---|
| private ReceiveCommand. | |
| type | back to summary |
|---|---|
| private ReceiveCommand. | |
| typeIsCorrect | back to summary |
|---|---|
| private boolean typeIsCorrect | |
| ReceiveCommand | back to summary |
|---|---|
| public ReceiveCommand(final ObjectId oldId, final ObjectId newId, final String name) Create a new command for
| |
| ReceiveCommand | back to summary |
|---|---|
| public ReceiveCommand(final ObjectId oldId, final ObjectId newId, final String name, final ReceiveCommand. Create a new command for
| |
| ReceiveCommand | back to summary |
|---|---|
| private ReceiveCommand(ObjectId oldId, String newSymref, String name) Create a command to switch a reference from object to symbolic.
| |
| ReceiveCommand | back to summary |
|---|---|
| private ReceiveCommand(String oldSymref, ObjectId newId, String name) Create a command to switch a reference from symbolic to object.
| |
| ReceiveCommand | back to summary |
|---|---|
| private ReceiveCommand(String oldTarget, String newTarget, String name) Create a command to switch a symbolic reference's target. | |
| abort | back to summary |
|---|---|
| public static void abort(Iterable<ReceiveCommand> commands) Set unprocessed commands as failed due to transaction aborted.
If a command is still
| |
| disableRefLog | back to summary |
|---|---|
| public void disableRefLog() Don't record this update in the ref's associated reflog.
Equivalent to
| |
| execute | back to summary |
|---|---|
| public void execute(ReceivePack rp) Execute this command during a receive-pack session. Sets the status of the command as a side effect.
| |
| filter | back to summary |
|---|---|
| public static List Filter a collection of commands according to result.
| |
| filter | back to summary |
|---|---|
| public static List Filter a list of commands according to result.
| |
| getMessage | back to summary |
|---|---|
| public String getMessage() Get the message associated with a failure status.
| |
| getNewId | back to summary |
|---|---|
| public ObjectId getNewId() Get the requested new value for this ref.
| |
| getNewSymref | back to summary |
|---|---|
| public String getNewSymref() Get requested new target for a symbolic reference. | |
| getOldId | back to summary |
|---|---|
| public ObjectId getOldId() Get the old value the client thinks the ref has.
| |
| getOldSymref | back to summary |
|---|---|
| public String getOldSymref() Get expected old target for a symbolic reference. | |
| getRef | back to summary |
|---|---|
| public Ref getRef() Get the ref, if this was advertised by the connection.
| |
| getRefLogMessage | back to summary |
|---|---|
| public String getRefLogMessage() Get the message to include in the reflog. | |
| getRefName | back to summary |
|---|---|
| public String getRefName() Get the name of the ref being updated.
| |
| getResult | back to summary |
|---|---|
| public ReceiveCommand. Get the current status code of this command.
| |
| getType | back to summary |
|---|---|
| public ReceiveCommand. Get the type of this command; see
| |
| hasCustomRefLog | back to summary |
|---|---|
| public boolean hasCustomRefLog() Check whether this command has a custom reflog message setting that should
override defaults in any containing
Does not take into account whether
| |
| isForceRefLog | back to summary |
|---|---|
| public Boolean isForceRefLog() Check whether the reflog should be written regardless of repo defaults. | |
| isRefLogDisabled | back to summary |
|---|---|
| public boolean isRefLogDisabled() Check whether log has been disabled by
| |
| isRefLogIncludingResult | back to summary |
|---|---|
| public boolean isRefLogIncludingResult() Check whether the reflog message should include the result of the update, such as fast-forward or force-update.
| |
| isTransactionAborted | back to summary |
|---|---|
| public static boolean isTransactionAborted(ReceiveCommand cmd) Check whether a command failed due to transaction aborted.
| |
| link | back to summary |
|---|---|
| public static ReceiveCommand link(ObjectId oldId, String newTarget, String name) Create a command to switch a reference from object to symbolic.
| |
| link | back to summary |
|---|---|
| public static ReceiveCommand link(String oldTarget, String newTarget, String name) Create a command to switch a symbolic reference's target.
| |
| reject | back to summary |
|---|---|
| pack-priv void reject(IOException err) | |
| setForceRefLog | back to summary |
|---|---|
| public void setForceRefLog(boolean force) Force writing a reflog for the updated ref.
| |
| setRef | back to summary |
|---|---|
| pack-priv void setRef(Ref r) | |
| setRefLogMessage | back to summary |
|---|---|
| public void setRefLogMessage(String msg, boolean appendStatus) Set the message to include in the reflog.
Overrides the default set by
| |
| setResult | back to summary |
|---|---|
| public void setResult(ReceiveCommand. Set the status of this command.
| |
| setResult | back to summary |
|---|---|
| public void setResult(ReceiveCommand. Set the status of this command.
| |
| setResult | back to summary |
|---|---|
| public void setResult(RefUpdate. Set the result of this command. | |
| setType | back to summary |
|---|---|
| pack-priv void setType(ReceiveCommand. | |
| setTypeFastForwardUpdate | back to summary |
|---|---|
| pack-priv void setTypeFastForwardUpdate() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| unlink | back to summary |
|---|---|
| public static ReceiveCommand unlink(String oldTarget, ObjectId newId, String name) Create a command to switch a reference from symbolic to object.
| |
| updateType | back to summary |
|---|---|
| public void updateType(RevWalk walk) throws IOException Update the type of this command by checking for fast-forward.
If the command's current type is UPDATE, a merge test will be performed
using the supplied RevWalk to determine if
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final ReceiveCommand. | LOCK_FAILURE
The ref could not be locked and updated atomically; try again. |
| public static final ReceiveCommand. | NOT_ATTEMPTED
The command has not yet been attempted by the server. |
| public static final ReceiveCommand. | OK
The change was completed successfully. |
| public static final ReceiveCommand. | REJECTED_CURRENT_BRANCH
The update affects |
| public static final ReceiveCommand. | REJECTED_MISSING_OBJECT
One or more objects aren't in the repository. |
| public static final ReceiveCommand. | REJECTED_NOCREATE
The server is configured to deny creation of this ref. |
| public static final ReceiveCommand. | REJECTED_NODELETE
The server is configured to deny deletion of this ref. |
| public static final ReceiveCommand. | REJECTED_NONFASTFORWARD
The update is a non-fast-forward update and isn't permitted. |
| public static final ReceiveCommand. | REJECTED_OTHER_REASON
Other failure; see |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static ReceiveCommand. | |
| public static ReceiveCommand. |
| LOCK_FAILURE | back to summary |
|---|---|
| public static final ReceiveCommand. The ref could not be locked and updated atomically; try again. | |
| NOT_ATTEMPTED | back to summary |
|---|---|
| public static final ReceiveCommand. The command has not yet been attempted by the server. | |
| OK | back to summary |
|---|---|
| public static final ReceiveCommand. The change was completed successfully. | |
| REJECTED_CURRENT_BRANCH | back to summary |
|---|---|
| public static final ReceiveCommand. The update affects | |
| REJECTED_MISSING_OBJECT | back to summary |
|---|---|
| public static final ReceiveCommand. One or more objects aren't in the repository. This is severe indication of either repository corruption on the server side, or a bug in the client wherein the client did not supply all required objects during the pack transfer. | |
| REJECTED_NOCREATE | back to summary |
|---|---|
| public static final ReceiveCommand. The server is configured to deny creation of this ref. | |
| REJECTED_NODELETE | back to summary |
|---|---|
| public static final ReceiveCommand. The server is configured to deny deletion of this ref. | |
| REJECTED_NONFASTFORWARD | back to summary |
|---|---|
| public static final ReceiveCommand. The update is a non-fast-forward update and isn't permitted. | |
| REJECTED_OTHER_REASON | back to summary |
|---|---|
| public static final ReceiveCommand. Other failure; see | |
| Result | back to summary |
|---|---|
| private Result() | |
| valueOf | back to summary |
|---|---|
| public static ReceiveCommand. | |
| values | back to summary |
|---|---|
| public static ReceiveCommand. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final ReceiveCommand. | CREATE
Create a new ref; the ref must not already exist. |
| public static final ReceiveCommand. | DELETE
Delete an existing ref; the ref should already exist. |
| public static final ReceiveCommand. | UPDATE
Update an existing ref with a fast-forward update. |
| public static final ReceiveCommand. | UPDATE_NONFASTFORWARD
Update an existing ref by potentially discarding objects. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static ReceiveCommand. | |
| public static ReceiveCommand. |
| CREATE | back to summary |
|---|---|
| public static final ReceiveCommand. Create a new ref; the ref must not already exist. | |
| DELETE | back to summary |
|---|---|
| public static final ReceiveCommand. Delete an existing ref; the ref should already exist. | |
| UPDATE | back to summary |
|---|---|
| public static final ReceiveCommand. Update an existing ref with a fast-forward update. During a fast-forward update no changes will be lost; only new commits are inserted into the ref. | |
| UPDATE_NONFASTFORWARD | back to summary |
|---|---|
| public static final ReceiveCommand. Update an existing ref by potentially discarding objects. The current value of the ref is not fully reachable from the new value of the ref, so a successful command may result in one or more objects becoming unreachable. | |
| Type | back to summary |
|---|---|
| private Type() | |
| valueOf | back to summary |
|---|---|
| public static ReceiveCommand. | |
| values | back to summary |
|---|---|
| public static ReceiveCommand. | |