Browse Source

Merge "diff: add option metaVar for --src-prefix and --dst-prefix"

stable-5.4
Christian Halstrick 6 years ago committed by Gerrit Code Review @ Eclipse.org
parent
commit
47add1cb58
  1. 1
      org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties
  2. 4
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java

1
org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties

@ -133,6 +133,7 @@ metaVar_path=path
metaVar_paths=path ... metaVar_paths=path ...
metaVar_pattern=pattern metaVar_pattern=pattern
metaVar_port=PORT metaVar_port=PORT
metaVar_prefix=PREFIX
metaVar_ref=REF metaVar_ref=REF
metaVar_refs=REFS metaVar_refs=REFS
metaVar_refspec=refspec metaVar_refspec=refspec

4
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); 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) { void sourcePrefix(String path) {
diffFmt.setOldPrefix(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) { void dstPrefix(String path) {
diffFmt.setNewPrefix(path); diffFmt.setNewPrefix(path);
} }

Loading…
Cancel
Save