aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/interpret-trailers.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-10-13 14:18:27 -0700
committerJunio C Hamano <gitster@pobox.com>2023-10-13 14:18:27 -0700
commitc75e91499ba78278418b76f85964642a18af449c (patch)
treeba2feaad56295a2c1b16385d3353e66fdaaffda8 /builtin/interpret-trailers.c
parente56b9edf228928fed72578bb7a4e6a35b47c551c (diff)
parent6ccbc6679426e39720278aedbb8e415dac8db79b (diff)
downloadgit-c75e91499ba78278418b76f85964642a18af449c.tar.gz
Merge branch 'la/trailer-test-and-doc-updates'
Test coverage for trailers has been improved. * la/trailer-test-and-doc-updates: trailer doc: <token> is a <key> or <keyAlias>, not both trailer doc: separator within key suppresses default separator trailer doc: emphasize the effect of configuration variables trailer --unfold help: prefer "reformat" over "join" trailer --parse docs: add explanation for its usefulness trailer --only-input: prefer "configuration variables" over "rules" trailer --parse help: expose aliased options trailer --no-divider help: describe usual "---" meaning trailer: trailer location is a place, not an action trailer doc: narrow down scope of --where and related flags trailer: add tests to check defaulting behavior with --no-* flags trailer test description: this tests --where=after, not --where=before trailer tests: make test cases self-contained
Diffstat (limited to 'builtin/interpret-trailers.c')
-rw-r--r--builtin/interpret-trailers.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/builtin/interpret-trailers.c b/builtin/interpret-trailers.c
index a110e69f83..033bd1556c 100644
--- a/builtin/interpret-trailers.c
+++ b/builtin/interpret-trailers.c
@@ -14,7 +14,7 @@
static const char * const git_interpret_trailers_usage[] = {
N_("git interpret-trailers [--in-place] [--trim-empty]\n"
- " [(--trailer <token>[(=|:)<value>])...]\n"
+ " [(--trailer (<key>|<keyAlias>)[(=|:)<value>])...]\n"
" [--parse] [<file>...]"),
NULL
};
@@ -100,7 +100,7 @@ int cmd_interpret_trailers(int argc, const char **argv, const char *prefix)
OPT_BOOL(0, "in-place", &opts.in_place, N_("edit files in place")),
OPT_BOOL(0, "trim-empty", &opts.trim_empty, N_("trim empty trailers")),
- OPT_CALLBACK(0, "where", &where, N_("action"),
+ OPT_CALLBACK(0, "where", &where, N_("placement"),
N_("where to place the new trailer"), option_parse_where),
OPT_CALLBACK(0, "if-exists", &if_exists, N_("action"),
N_("action if trailer already exists"), option_parse_if_exists),
@@ -108,11 +108,11 @@ int cmd_interpret_trailers(int argc, const char **argv, const char *prefix)
N_("action if trailer is missing"), option_parse_if_missing),
OPT_BOOL(0, "only-trailers", &opts.only_trailers, N_("output only the trailers")),
- OPT_BOOL(0, "only-input", &opts.only_input, N_("do not apply config rules")),
- OPT_BOOL(0, "unfold", &opts.unfold, N_("join whitespace-continued values")),
- OPT_CALLBACK_F(0, "parse", &opts, NULL, N_("set parsing options"),
+ OPT_BOOL(0, "only-input", &opts.only_input, N_("do not apply trailer.* configuration variables")),
+ OPT_BOOL(0, "unfold", &opts.unfold, N_("reformat multiline trailer values as single-line values")),
+ OPT_CALLBACK_F(0, "parse", &opts, NULL, N_("alias for --only-trailers --only-input --unfold"),
PARSE_OPT_NOARG | PARSE_OPT_NONEG, parse_opt_parse),
- OPT_BOOL(0, "no-divider", &opts.no_divider, N_("do not treat --- specially")),
+ OPT_BOOL(0, "no-divider", &opts.no_divider, N_("do not treat \"---\" as the end of input")),
OPT_CALLBACK(0, "trailer", &trailers, N_("trailer"),
N_("trailer(s) to add"), option_parse_trailer),
OPT_END()