]> git.ipfire.org Git - thirdparty/git.git/commit
history: extract helper for a commit's parent tree
authorHarald Nordgren <haraldnordgren@gmail.com>
Mon, 20 Jul 2026 08:27:00 +0000 (08:27 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 29 Jul 2026 17:36:55 +0000 (10:36 -0700)
commite181cedac1b5b786d4e228b14ba8ba4df286d40c
tree2d3408a4540d81c98ded9539c1e26376993b7a43
parent48bbf81c29ca9a4479ec7850fe206518682cdb2f
history: extract helper for a commit's parent tree

Three places resolve the tree of a commit's first parent, falling back
to the empty tree for a root commit, each repeating the same parse and
oidcpy dance. Extract a first_parent_tree_oid() helper and route the
existing callers through it.

No change in behavior.

Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/history.c