From 963651b762f6b2a8937eb08766f0233202038e8a Mon Sep 17 00:00:00 2001 From: Andre Bossert Date: Sat, 23 Feb 2019 16:03:58 +0100 Subject: [PATCH] diff: add option metaVar for --src-prefix and --dst-prefix Fixes exception if using "jgit diff --help". Bug: 544735 Change-Id: I694ff3103da4bc199dd03c40962c5be191eddcd1 Signed-off-by: Andre Bossert --- .../org/eclipse/jgit/pgm/internal/CLIText.properties | 1 + org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties index 7c4119fd0..a482ce3f3 100644 --- a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties +++ b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties @@ -133,6 +133,7 @@ metaVar_path=path metaVar_paths=path ... metaVar_pattern=pattern metaVar_port=PORT +metaVar_prefix=PREFIX metaVar_ref=REF metaVar_refs=REFS metaVar_refspec=refspec 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 a86e8dddc..7747dc7dd 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 @@ -151,12 +151,12 @@ class Diff extends TextBuiltin { diffFmt.setAbbreviationLength(OBJECT_ID_STRING_LENGTH); } - @Option(name = "--src-prefix", usage = "usage_srcPrefix") + @Option(name = "--src-prefix", metaVar = "metaVar_prefix", usage = "usage_srcPrefix") void sourcePrefix(String path) { diffFmt.setOldPrefix(path); } - @Option(name = "--dst-prefix", usage = "usage_dstPrefix") + @Option(name = "--dst-prefix", metaVar = "metaVar_prefix", usage = "usage_dstPrefix") void dstPrefix(String path) { diffFmt.setNewPrefix(path); }