Repository navigation
pr-2270/rogerkorantenng/mktree-batch-tests-v1
tagged this
20 Oct 11:54
From: Roger Koranteng <rogerkorantenng@gmail.com> The only "mktree --batch" test in t1010 is the one checking that it survives a concurrent repack. Nothing covers basic batch mode, which is how the leak fixed in 6272f3bd17 (mktree: plug per-tree leak in --batch mode, 2026-08-29) went unnoticed. Add a few tests for it. Two trees in one batch should get the same IDs as running plain "mktree" on each, a trailing blank line should not add an extra tree, -z input should work, and a tree that names a missing object should make mktree die after printing the trees before it. While at it, check that a blank line is rejected without --batch. One test feeds two blank lines in a row and expects an empty tree in between. That is what mktree does today, but the documentation says trees are separated by "a single blank line", so I am not sure it is intended. The test records the current behaviour. Suggested-by: Jeff King <peff@peff.net> Signed-off-by: Roger Koranteng <rogerkorantenng@gmail.com> Submitted-As: https://lore.kernel.org/git/pull.2270.git.1792497283164.gitgitgadget@gmail.com