Skip to content

CLI: commit command#7259

Open
ethomson wants to merge 8 commits into
mainfrom
ethomson/commi_create
Open

CLI: commit command#7259
ethomson wants to merge 8 commits into
mainfrom
ethomson/commi_create

Conversation

@ethomson
Copy link
Copy Markdown
Member

Introduce a git commit-style command.

ethomson added 8 commits May 13, 2026 23:01
Introduce `git_commit_create_ext` and an options structure for
extensibility. Non-default arguments (message encoding, reference
updates) are in the options structure.

This simplifies the complex self-service commit creation APIs and allows
for future sustainable improvements.
Some clients (eg GitButler) are storing additional information in custom
user-specified commit headers. We should make this a first-class
concept.
Callers can now introduce a commit signing callback instead of needing
to call a specialized commit buffer creation function.
`GIT_ASSERT` is not necessarily useful for the CLI; we need something
that prints to stderr and exits.
The process options structure should be allowed to be `NULL`; treated as
if it's empty.
Similar to the `git_commit_create_from_stage` function, a batteries-
included commit creation function that uses smart defaults and commits a
given tree.
Similar to the `git_commit_create_from_...` APIs, a simple amend
function that uses smart defaults and amends HEAD from the staged
changes or a given tree.
@ethomson ethomson force-pushed the ethomson/commi_create branch from 904fa9c to a8f9efb Compare May 13, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant