Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/Documentation/config/trailer.adoc # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / Documentation / config / trailer.adoc` 137 lines ยท 5942 bytes Raw Blame History 1 `trailer.separators`:: 2 This option tells which characters are recognized as trailer 3 separators. By default only `:` is recognized as a trailer 4 separator, except that `=` is always accepted on the command 5 line for compatibility with other git commands. 6 + 7 The first character given by this option will be the default character 8 used when another separator is not specified in the config for this 9 trailer. 10 + 11 For example, if the value for this option is `%=$`, then only lines 12 using the format __ with __ containing `%`, `=` 13 or `$` and then spaces will be considered trailers. And `%` will be 14 the default separator used, so by default trailers will appear like: 15 `% ` (one percent sign and one space will appear between 16 the key and the value). 17 18 `trailer.where`:: 19 This option tells where a new trailer will be added. 20 + 21 This can be `end`, which is the default, `start`, `after` or `before`. 22 + 23 If it is `end`, then each new trailer will appear at the end of the 24 existing trailers. 25 + 26 If it is `start`, then each new trailer will appear at the start, 27 instead of the end, of the existing trailers. 28 + 29 If it is `after`, then each new trailer will appear just after the 30 last trailer with the same __. 31 + 32 If it is `before`, then each new trailer will appear just before the 33 first trailer with the same __. 34 35 `trailer.ifexists`:: 36 This option makes it possible to choose what action will be 37 performed when there is already at least one trailer with the 38 same __ in the input. 39 + 40 The valid values for this option are: `addIfDifferentNeighbor` (this 41 is the default), `addIfDifferent`, `add`, `replace` or `doNothing`. 42 + 43 With `addIfDifferentNeighbor`, a new trailer will be added only if no 44 trailer with the same (__, __) pair is above or below the line 45 where the new trailer will be added. 46 + 47 With `addIfDifferent`, a new trailer will be added only if no trailer 48 with the same (__, __) pair is already in the input. 49 + 50 With `add`, a new trailer will be added, even if some trailers with 51 the same (__, __) pair are already in the input. 52 + 53 With `replace`, an existing trailer with the same __ will be 54 deleted and the new trailer will be added. The deleted trailer will be 55 the closest one (with the same __) to the place where the new one 56 will be added. 57 + 58 With `doNothing`, nothing will be done; that is no new trailer will be 59 added if there is already one with the same __ in the input. 60 61 `trailer.ifmissing`:: 62 This option makes it possible to choose what action will be 63 performed when there is not yet any trailer with the same 64 __ in the input. 65 + 66 The valid values for this option are: `add` (this is the default) and 67 `doNothing`. 68 + 69 With `add`, a new trailer will be added. 70 + 71 With `doNothing`, nothing will be done. 72 73 `trailer..key`:: 74 Defines a __ for the __. The __ must be a 75 prefix (case does not matter) of the __. For example, in `git 76 config trailer.ack.key "Acked-by"` the `Acked-by` is the __ and 77 the `ack` is the __. This configuration allows the shorter 78 `--trailer "ack:..."` invocation on the command line using the "ack" 79 `` instead of the longer `--trailer "Acked-by:..."`. 80 + 81 At the end of the __, a separator can appear and then some 82 space characters. By default the only valid separator is `:`, 83 but this can be changed using the `trailer.separators` config 84 variable. 85 + 86 If there is a separator in the key, then it overrides the default 87 separator when adding the trailer. 88 89 `trailer..where`:: 90 This option takes the same values as the `trailer.where` 91 configuration variable and it overrides what is specified by 92 that option for trailers with the specified __. 93 94 `trailer..ifexists`:: 95 This option takes the same values as the `trailer.ifexists` 96 configuration variable and it overrides what is specified by 97 that option for trailers with the specified __. 98 99 `trailer..ifmissing`:: 100 This option takes the same values as the `trailer.ifmissing` 101 configuration variable and it overrides what is specified by 102 that option for trailers with the specified __. 103 104 `trailer..command`:: 105 Deprecated in favor of `trailer..cmd`. 106 This option behaves in the same way as `trailer..cmd`, except 107 that it doesn't pass anything as argument to the specified command. 108 Instead the first occurrence of substring `$ARG` is replaced by the 109 __ that would be passed as argument. 110 + 111 Note that `$ARG` in the user's command is 112 only replaced once and that the original way of replacing `$ARG` is not safe. 113 + 114 When both `trailer..cmd` and `trailer..command` are given 115 for the same __, `trailer..cmd` is used and 116 `trailer..command` is ignored. 117 118 `trailer..cmd`:: 119 This option can be used to specify a shell command that will be called 120 once to automatically add a trailer with the specified __, and then 121 called each time a `--trailer =` argument is specified to 122 modify the __ of the trailer that this option would produce. 123 + 124 When the specified command is first called to add a trailer 125 with the specified __, the behavior is as if a special 126 `--trailer =` argument was added at the beginning 127 of linkgit:git-interpret-trailers[1], where __ is taken to be the 128 standard output of the command with any leading and trailing whitespace 129 trimmed off. 130 + 131 If some `--trailer =` arguments are also passed 132 on the command line, the command is called again once for each 133 of these arguments with the same __. And the __ part 134 of these arguments, if any, will be passed to the command as its 135 first argument. This way the command can produce a __ computed 136 from the __ passed in the `--trailer =` 137 argument.