From: Michele Locati Date: Tue, 29 Sep 2026 14:31:50 GMT Subject: Re: [PATCH] fiter-branch: fix commit map init from state branch Message-ID: <20260929143150.2420-1-michele@locati.it> In-Reply-To: <20260801033127.10606-1-dev@grantmoyer.com> Hi Grant, thanks for this patch: I hit the same bug, and I was about to report it. Cc'ing Patrick and Junio, since the problem was introduced by f6d855091e (filter-branch: stop depending on Perl, 2025-04-16), released in 2.50.0. I tested your fix with git 2.56.0, running filter-branch incrementally with --state-branch, --prune-empty and --subdirectory-filter: - without the fix, the new commits are attached to the original parents instead of the rewritten ones, and swapped entries are saved back to the state branch; - with the fix, the parents are the rewritten commits and the state is saved correctly. Tested-by: Michele Locati We know that the use of filter-branch is not recommended, but we rely on --state-branch to split a repository incrementally, that is, processing only the new commits instead of the whole history at every run. It would be great to have this fix merged. A minor note: there's a typo in the subject ("fiter-branch"). Thanks, Michele