Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2019-06-19 06:37:28 +0300
committerJunio C Hamano <gitster@pobox.com>2019-06-19 17:12:49 +0300
commit29c83fc23f140c6d06e13916f40e6830616cfa29 (patch)
tree555fac47bdc47479a031e5ebc79710e80b0e695b /builtin/interpret-trailers.c
parent0d0ac3826a3bbb9247e39e12623bbcfdd722f24c (diff)
interpret-trailers: load default config
The interpret-trailers program does not do the usual loading of config via git_default_config(), and thus does not respect many of the usual options. In particular, we will not load core.commentChar, even though the underlying trailer code uses its value. This can be seen in the accompanying test, where setting core.commentChar to anything besides "#" results in a failure to treat the comments correctly. Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/interpret-trailers.c')
-rw-r--r--builtin/interpret-trailers.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/interpret-trailers.c b/builtin/interpret-trailers.c
index 8ae40dec47..f101d092b8 100644
--- a/builtin/interpret-trailers.c
+++ b/builtin/interpret-trailers.c
@@ -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>...]"),
@@ -112,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);