]> source.dussan.org Git - jgit.git/commitdiff
Add toString() to simplify debugging rebase steps 77/6477/1
authorMatthias Sohn <matthias.sohn@sap.com>
Sat, 23 Jun 2012 23:00:31 +0000 (01:00 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Sat, 23 Jun 2012 23:00:31 +0000 (01:00 +0200)
Change-Id: Id1508c5f007a6a6680928992a1c7524c266a9ce4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java

index 374db4c9ac58aef39ccc2234a938d5c656d2dd66..6f0c3eb0f4c363dfcdd72dd9d3fed3d181919497 100644 (file)
@@ -955,6 +955,11 @@ public class RebaseCommand extends GitCommand<RebaseResult> {
                        return this.token;
                }
 
+               @Override
+               public String toString() {
+                       return "Action[" + token + "]";
+               }
+
                static Action parse(String token) {
                        if (token.equals("pick") || token.equals("p"))
                                return PICK;
@@ -974,6 +979,15 @@ public class RebaseCommand extends GitCommand<RebaseResult> {
                Step(Action action) {
                        this.action = action;
                }
+
+               @Override
+               public String toString() {
+                       return "Step[" + action + ", "
+                                       + ((commit == null) ? "null" : commit)
+                                       + ", "
+                                       + ((shortMessage == null) ? "null" : new String(
+                                                       shortMessage)) + "]";
+               }
        }
 
        PersonIdent parseAuthor(byte[] raw) {