Add toString for TrackingRefUpdate
Makes it much easier to debug the results of OperationResult#getTrackingRefUpdates (which otherwise requires digging into a TreeMap structure). Change-Id: I90da5385ee47c441404728f252eb3a100c48ee1c
This commit is contained in:
parent
78c8659428
commit
85b189fdbe
|
@ -193,4 +193,21 @@ private RefUpdate.Result decode(ReceiveCommand.Result status) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("TrackingRefUpdate[");
|
||||||
|
sb.append(remoteName);
|
||||||
|
sb.append(" -> ");
|
||||||
|
sb.append(localName);
|
||||||
|
if (forceUpdate)
|
||||||
|
sb.append(" (forced)");
|
||||||
|
sb.append(" ");
|
||||||
|
sb.append(oldObjectId == null ? "" : oldObjectId.abbreviate(7).name());
|
||||||
|
sb.append("..");
|
||||||
|
sb.append(newObjectId == null ? "" : newObjectId.abbreviate(7).name());
|
||||||
|
sb.append("]");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue