Browse Source

Merge "Add toString for TrackingRefUpdate"

stable-2.2
Robin Rosenberg 12 years ago committed by Gerrit Code Review @ Eclipse.org
parent
commit
aca8df0425
  1. 17
      org.eclipse.jgit/src/org/eclipse/jgit/transport/TrackingRefUpdate.java

17
org.eclipse.jgit/src/org/eclipse/jgit/transport/TrackingRefUpdate.java

@ -193,4 +193,21 @@ public class TrackingRefUpdate {
}
}
}
@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…
Cancel
Save