worktree remove: clarify error message on dirty worktree
[gitweb.git] / builtin / interpret-trailers.c
index 4b87e0dd2e8854bf940e92e3020c5e4f66e8a6bd..f101d092b883e6554cce193c66626b5707252c3f 100644 (file)
@@ -10,6 +10,7 @@
 #include "parse-options.h"
 #include "string-list.h"
 #include "trailer.h"
+#include "config.h"
 
 static const char * const git_interpret_trailers_usage[] = {
        N_("git interpret-trailers [--in-place] [--trim-empty] [(--trailer <token>[(=|:)<value>])...] [<file>...]"),
@@ -80,6 +81,8 @@ static int parse_opt_parse(const struct option *opt, const char *arg,
        v->only_trailers = 1;
        v->only_input = 1;
        v->unfold = 1;
+       BUG_ON_OPT_NEG(unset);
+       BUG_ON_OPT_ARG(arg);
        return 0;
 }
 
@@ -110,6 +113,8 @@ int cmd_interpret_trailers(int argc, const char **argv, const char *prefix)
                OPT_END()
        };
 
+       git_config(git_default_config, NULL);
+
        argc = parse_options(argc, argv, prefix, options,
                             git_interpret_trailers_usage, 0);