]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'la/trailer-test-and-doc-updates'
authorJunio C Hamano <gitster@pobox.com>
Fri, 13 Oct 2023 21:18:27 +0000 (14:18 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 13 Oct 2023 21:18:27 +0000 (14:18 -0700)
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

1  2 
builtin/interpret-trailers.c

index a110e69f831f5a911f069784ab708ba092dc105d,d2d78fd961f6c4d3b93029dc6bf2ec2267d254e5..033bd1556cf9f8d6e56c2730a3e868500388144e
@@@ -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")),