From 3d98c3f0f30633b4952617a657e8fda590ed2af4 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Sun, 24 Jun 2012 01:00:31 +0200 Subject: [PATCH] Add toString() to simplify debugging rebase steps Change-Id: Id1508c5f007a6a6680928992a1c7524c266a9ce4 Signed-off-by: Matthias Sohn --- .../src/org/eclipse/jgit/api/RebaseCommand.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java index 374db4c9a..6f0c3eb0f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java @@ -955,6 +955,11 @@ public String toToken() { 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 @@ static class Step { 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) {