Browse Source

Add BatchRefUpdate#toString()

Change-Id: I58c342a91911763055c1073d2f426340fbf94fa4
stable-4.0
Dave Borowitz 10 years ago
parent
commit
23ad3a3763
  1. 16
      org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchRefUpdate.java

16
org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchRefUpdate.java

@ -394,4 +394,20 @@ public class BatchRefUpdate {
return ru; return ru;
} }
} }
@Override
public String toString() {
StringBuilder r = new StringBuilder();
r.append(getClass().getSimpleName()).append('[');
if (commands.isEmpty())
return r.append(']').toString();
r.append('\n');
for (ReceiveCommand cmd : commands) {
r.append(" "); //$NON-NLS-1$
r.append(cmd);
r.append(" (").append(cmd.getResult()).append(")\n"); //$NON-NLS-1$ //$NON-NLS-2$
}
return r.append(']').toString();
}
} }

Loading…
Cancel
Save