git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] fiter-branch: fix commit map init from state branch

From
Michele Locati <michele@locati.it>
Date
Sep 29, 2026, 14:31 UTC
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 <michele@locati.it>

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

Previous: Grant MoyerNext: Patrick Steinhardt
Message 2 of 12 in “fiter-branch: fix commit map init from state branch”
  1. fiter-branch: fix commit map init from state branchGrant Moyer, Aug 1, 2026
  2. Michele LocatiSep 29, 2026
  3. Patrick SteinhardtSep 30, 2026
  4. Grant MoyerSep 30, 2026
  5. Patrick SteinhardtSep 30, 2026
  6. Michele LocatiSep 30, 2026
  7. filter-branch: fix commit map init from state branchGrant Moyer, Oct 1, 2026
  8. Patrick SteinhardtOct 1, 2026
  9. Michele LocatiOct 1, 2026
  10. Junio C HamanoOct 1, 2026
  11. filter-branch: fix commit map init from state branchGrant Moyer, Oct 3, 2026
  12. Patrick SteinhardtOct 5, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.