From f6df5cf26ebdc5223262a11c94e7082c36656dc5 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Sun, 9 Oct 2016 23:46:39 +0200 Subject: [PATCH] Add toString() to CherryPickCommand and ResetCommand Change-Id: Ie2dd87943350e3b0a2df72a70e5219139d110a8f Signed-off-by: Matthias Sohn --- .../src/org/eclipse/jgit/api/CherryPickCommand.java | 11 +++++++++++ .../src/org/eclipse/jgit/api/ResetCommand.java | 8 ++++++++ 2 files changed, 19 insertions(+) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java index e82a69798..276bf96ea 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java @@ -330,4 +330,15 @@ public class CherryPickCommand extends GitCommand { String headName = Repository.shortenRefName(targetRefName); return headName; } + + @SuppressWarnings("nls") + @Override + public String toString() { + return "CherryPickCommand [repo=" + repo + ",\ncommits=" + commits + + ",\nmainlineParentNumber=" + mainlineParentNumber + + ", noCommit=" + noCommit + ", ourCommitName=" + ourCommitName + + ", reflogPrefix=" + reflogPrefix + ", strategy=" + strategy + + "]"; + } + } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ResetCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ResetCommand.java index 3ceff843a..106988d4d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ResetCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ResetCommand.java @@ -432,4 +432,12 @@ public class ResetCommand extends GitCommand { repo.writeMergeCommitMsg(null); } + @SuppressWarnings("nls") + @Override + public String toString() { + return "ResetCommand [repo=" + repo + ", ref=" + ref + ", mode=" + mode + + ", isReflogDisabled=" + isReflogDisabled + ", filepaths=" + + filepaths + "]"; + } + }