]> source.dussan.org Git - jgit.git/commitdiff
add: Fix bad metaVar reference in <filepattern> help 27/8927/1
authorJonathan Nieder <jrn@google.com>
Thu, 29 Nov 2012 01:48:25 +0000 (17:48 -0800)
committerJonathan Nieder <jrn@google.com>
Thu, 29 Nov 2012 01:48:25 +0000 (17:48 -0800)
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

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

index 4670b3508e2a7098b25b3456353958f9d3348328..12aac77e9d71bab5ded8df645239b6dfa308f59a 100644 (file)
@@ -57,7 +57,7 @@ class Add extends TextBuiltin {
        @Option(name = "--update", aliases = { "-u" }, usage = "usage_onlyMatchAgainstAlreadyTrackedFiles")
        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>();
 
        @Override
index 0ed6a78a14b573cfbccbb04f77eaede402538703..2228555df5402989019ab90ab54bf0f8f81390d7 100644 (file)
@@ -152,6 +152,7 @@ public class CLIText extends TranslationBundle {
        /***/ public String metaVar_diffAlg;
        /***/ public String metaVar_directory;
        /***/ public String metaVar_file;
+       /***/ public String metaVar_filepattern;
        /***/ public String metaVar_gitDir;
        /***/ public String metaVar_hostName;
        /***/ public String metaVar_linesOfContext;