Expand description
The message and identities of a service commit, made as native git commit makes them.
What:
The message and the identities of a commit the service lands, made from the command line the way native
git commit makes them when no editor opens.
Why:
Everything here is text arithmetic that Git itself defines (clean-up, sign-off, trailers, the subject of a fixup,
the message and authorship of a reused commit), so the wrapper embeds it instead of starting git commit; each
rule is compared field by field with the native commit in binary_service_options_tests.rs. Whatever cannot be
made without guessing returns nothing and native git commit handles the line.
In TS you’d write (pseudocode):
const { message, author } = await buildMessage(invocation, parsed, committer);Structs§
- Built
- What a command line’s message came to.
Functions§
- author_
overrides - The author variables
--authorand--datestand for. - build_
message - What:
The message the command line stands for:
-mtexts, the-Ffile, the message of the-Ccommit or the subject line of a fixup, cleaned as Git cleans it when no editor opens (or kept as given for--cleanup=verbatim), then given the sign-off and the--trailerlines by Git’s own trailer interpreter. Why: Nothing here guesses: an empty message without--allow-empty-message, an unreadable file, a commit Git cannot resolve or a trailer Git refuses returns nothing, and nativegit committhen gives the person its own message. - identity
- One identity line (
Name <email> seconds zone) from Git’s own resolution of the variable, with the given overrides; nothing when Git cannot make one (a date it does not read), so nativegit commitgives its own message. - strip_
comment_ lines - The lines of a message without those that start with the comment character, as
--cleanup=stripdrops them.