From: Junio C Hamano Date: Fri, 13 Oct 2023 21:18:27 +0000 (-0700) Subject: Merge branch 'la/trailer-test-and-doc-updates' X-Git-Tag: v2.43.0-rc0~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c75e91499ba78278418b76f85964642a18af449c;p=thirdparty%2Fgit.git Merge branch 'la/trailer-test-and-doc-updates' Test coverage for trailers has been improved. * la/trailer-test-and-doc-updates: trailer doc: is a or , 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 --- c75e91499ba78278418b76f85964642a18af449c diff --cc builtin/interpret-trailers.c index a110e69f83,d2d78fd961..033bd1556c --- a/builtin/interpret-trailers.c +++ b/builtin/interpret-trailers.c @@@ -100,11 -97,11 +100,11 @@@ int cmd_interpret_trailers(int argc, co 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", NULL, N_("placement"), ++ OPT_CALLBACK(0, "where", &where, N_("placement"), N_("where to place the new trailer"), option_parse_where), - OPT_CALLBACK(0, "if-exists", NULL, N_("action"), + OPT_CALLBACK(0, "if-exists", &if_exists, N_("action"), N_("action if trailer already exists"), option_parse_if_exists), - OPT_CALLBACK(0, "if-missing", NULL, N_("action"), + OPT_CALLBACK(0, "if-missing", &if_missing, N_("action"), N_("action if trailer is missing"), option_parse_if_missing), OPT_BOOL(0, "only-trailers", &opts.only_trailers, N_("output only the trailers")),