aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorDave Borowitz <dborowitz@google.com>2015-01-26 11:04:21 -0800
committerDave Borowitz <dborowitz@google.com>2015-01-27 10:04:29 -0800
commit23ad3a37638f295e22a67ca16aefeeb53467e289 (patch)
tree1bb4254c9212e49f5331e66ce79001a4817d86f4 /org.eclipse.jgit
parent94ebdbfada07e4ab7ca63a3291095f3217e1ff89 (diff)
downloadjgit-23ad3a37638f295e22a67ca16aefeeb53467e289.tar.gz
jgit-23ad3a37638f295e22a67ca16aefeeb53467e289.zip
Add BatchRefUpdate#toString()
Change-Id: I58c342a91911763055c1073d2f426340fbf94fa4
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchRefUpdate.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchRefUpdate.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchRefUpdate.java
index b369d0d1f5..73850b7889 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchRefUpdate.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchRefUpdate.java
@@ -394,4 +394,20 @@ public class BatchRefUpdate {
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();
+ }
}