]> Kevux Git Server - rit/commit
builtin/history: generalize function to commit trees
authorPatrick Steinhardt <ps@pks.im>
Mon, 27 Apr 2026 05:53:52 +0000 (07:53 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Apr 2026 13:20:57 +0000 (22:20 +0900)
commit88191ea02330627a85664909026fb6953e0d8af8
tree1c61a1db58561f831b51916a5673b2b7e7221ec7
parent0cf4ad7cf555ac2ed6556a3169d30b2eabb68d41
builtin/history: generalize function to commit trees

The function `commit_tree_with_edited_message_ext()` can be used to
commit a tree with a specific list of parents with an edited commit
message. This function is useful outside of editing the commit message
though, as it also performs the plumbing to extract the original commit
message and strip some headers from it.

Refactor the function to receive a flags field that allows the caller to
control whether or not the commit message should be edited, or whether
it should be retained as-is. This will be used in a subsequent commit.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/history.c