Expose ReceiveCommand version of TrackingRefUpdate
If the caller uses a BatchRefUpdate to execute these (e.g. fetch) there may be more detailed status information inside of the command that was used to execute it. Allow the caller to obtain that status data from the ReceiveCommand version of the TrackingRefUpdate. Change-Id: I47209377fb8fcef0346d7678f1ab27f4790b49bc
This commit is contained in:
parent
c8dd915c45
commit
911b115772
|
@ -58,6 +58,7 @@ public class TrackingRefUpdate {
|
||||||
private ObjectId newObjectId;
|
private ObjectId newObjectId;
|
||||||
|
|
||||||
private RefUpdate.Result result;
|
private RefUpdate.Result result;
|
||||||
|
private ReceiveCommand cmd;
|
||||||
|
|
||||||
TrackingRefUpdate(
|
TrackingRefUpdate(
|
||||||
boolean canForceUpdate,
|
boolean canForceUpdate,
|
||||||
|
@ -130,8 +131,14 @@ void setResult(RefUpdate.Result result) {
|
||||||
this.result = result;
|
this.result = result;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReceiveCommand asReceiveCommand() {
|
/**
|
||||||
return new Command();
|
* @return this update wrapped by a ReceiveCommand.
|
||||||
|
* @since 3.4
|
||||||
|
*/
|
||||||
|
public ReceiveCommand asReceiveCommand() {
|
||||||
|
if (cmd == null)
|
||||||
|
cmd = new Command();
|
||||||
|
return cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
final class Command extends ReceiveCommand {
|
final class Command extends ReceiveCommand {
|
||||||
|
|
Loading…
Reference in New Issue