]> git.ipfire.org Git - thirdparty/git.git/commit
contrib/subtree: functionalize split traversal
authorColin Stagner <ask+git@howdoi.land>
Thu, 5 Mar 2026 23:55:48 +0000 (17:55 -0600)
committerJunio C Hamano <gitster@pobox.com>
Fri, 6 Mar 2026 21:57:48 +0000 (13:57 -0800)
commit3b3ace4d5bb72cb1845e547439b53e00dcf49b8e
tree4a95bf068cb9eaa4b87534048ef9d4fc302e05a0
parentf8e90b972ef9567df2d6983ae2c5f1f2659e86ad
contrib/subtree: functionalize split traversal

`git subtree split` requires an ancestor-first history traversal.
Refactor the existing rev-list traversal into its own function,
`find_commits_to_split`.

Pass unrevs via stdin to avoid limits on the maximum length of
command-line arguments. Also remove an unnecessary `eval`.

Signed-off-by: Colin Stagner <ask+git@howdoi.land>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/subtree/git-subtree.sh