From: Josh Steadmon Date: Mon, 02 Feb 2026 18:54:13 GMT Subject: Re: [PATCH v3] subtree: validate --prefix against commit in split Message-ID: <7k7ewvrb5hj3jyesiigy6dvo5w5pl67rk7ihztsuxbtqpymafv@ey64nvhzhacg> In-Reply-To: <20260115175403.3971-3-pushkarkumarsingh1970@gmail.com> On 2026.01.15 17:52, Pushkar Singh wrote: > git subtree split currently validates --prefix against the working tree. > This breaks when splitting an older commit or when the working tree does > not contain the subtree, even though the commit does. > > For example: > > git subtree split --prefix=pkg > > fails if pkg was removed later, even though it exists in . > > Fix this by validating the prefix against the specified commit using > git ls-tree instead of the working tree. > > Add a test to ensure this behavior does not regress. > > Signed-off-by: Pushkar Singh Unfortunately, it seems this patch breaks the subtree tests. We noticed a failure in our build system at $WORK, and I was able to bisect the failure to this commit: $ git bisect start 54b18a3513eed9ed5ced5c238ade55a434fd619a 66b2238f5c17644ddf15f75a53c76faeca6d9f1e $ git bisect run sh -c 'make && make -C contrib/subtree && make -C contrib/subtree test' The tests fail on case 17 - split requires path given by option --prefix must exist.