Browse Source

add: Fix bad metaVar reference in <filepattern> help

Without this patch, "jgit add --help" throws two exceptions
(NoSuchFieldException: metavar_filepattern; MissingResourceException:
Can't find resource for bundle java.util.PropertyResourceBundle, key
metavar_filepattern) instead of printing a usage message, due to a
small typo and a missing declaration.

Change-Id: I4b848b3a8c7b1a49d8b9582809375daa4aca6b50
stable-2.2
Jonathan Nieder 12 years ago
parent
commit
b46b27e389
  1. 2
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Add.java
  2. 1
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CLIText.java

2
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Add.java

@ -57,7 +57,7 @@ class Add extends TextBuiltin {
@Option(name = "--update", aliases = { "-u" }, usage = "usage_onlyMatchAgainstAlreadyTrackedFiles") @Option(name = "--update", aliases = { "-u" }, usage = "usage_onlyMatchAgainstAlreadyTrackedFiles")
private boolean update = false; private boolean update = false;
@Argument(required = true, metaVar = "metavar_filepattern", usage = "usage_filesToAddContentFrom") @Argument(required = true, metaVar = "metaVar_filepattern", usage = "usage_filesToAddContentFrom")
private List<String> filepatterns = new ArrayList<String>(); private List<String> filepatterns = new ArrayList<String>();
@Override @Override

1
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CLIText.java

@ -152,6 +152,7 @@ public class CLIText extends TranslationBundle {
/***/ public String metaVar_diffAlg; /***/ public String metaVar_diffAlg;
/***/ public String metaVar_directory; /***/ public String metaVar_directory;
/***/ public String metaVar_file; /***/ public String metaVar_file;
/***/ public String metaVar_filepattern;
/***/ public String metaVar_gitDir; /***/ public String metaVar_gitDir;
/***/ public String metaVar_hostName; /***/ public String metaVar_hostName;
/***/ public String metaVar_linesOfContext; /***/ public String metaVar_linesOfContext;

Loading…
Cancel
Save