diff options
Diffstat (limited to 'org.eclipse.jgit.pgm/src/org/eclipse')
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java | 16 | ||||
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java | 16 |
2 files changed, 32 insertions, 0 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java index b6650a4ea1..ec939b37e4 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java @@ -131,6 +131,22 @@ class Diff extends TextBuiltin { diffFmt.setAbbreviationLength(Constants.OBJECT_ID_STRING_LENGTH); } + @Option(name = "--src-prefix", usage = "usage_srcPrefix") + void sourcePrefix(String path) { + diffFmt.setOldPrefix(path); + } + + @Option(name = "--dst-prefix", usage = "usage_dstPrefix") + void dstPrefix(String path) { + diffFmt.setNewPrefix(path); + } + + @Option(name = "--no-prefix", usage = "usage_noPrefix") + void noPrefix(@SuppressWarnings("unused") boolean on) { + diffFmt.setOldPrefix(""); + diffFmt.setNewPrefix(""); + } + // END -- Options shared with Log @Override diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java index 2b29f73385..8eb2e54dc5 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java @@ -139,6 +139,22 @@ class Log extends RevWalkTextBuiltin { diffFmt.setAbbreviationLength(Constants.OBJECT_ID_STRING_LENGTH); } + @Option(name = "--src-prefix", usage = "usage_srcPrefix") + void sourcePrefix(String path) { + diffFmt.setOldPrefix(path); + } + + @Option(name = "--dst-prefix", usage = "usage_dstPrefix") + void dstPrefix(String path) { + diffFmt.setNewPrefix(path); + } + + @Option(name = "--no-prefix", usage = "usage_noPrefix") + void noPrefix(@SuppressWarnings("unused") boolean on) { + diffFmt.setOldPrefix(""); + diffFmt.setNewPrefix(""); + } + // END -- Options shared with Diff Log() { |