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

New command/tool: git filter-repo

From
Elijah Newren <newren@gmail.com>
Date
Jan 31, 2019, 08:57 UTC
Message-ID
<CABPp-BFC--s+D0ijRkFCRxP5Lxfi+__YF4EdxkpO5z+GoNW7Gg@mail.gmail.com>
Hi everyone,

git-filter-repo[1], a filter-branch-like tool for rewriting repository history, is ready for more widespread testing and feedback. The rough edges I previously mentioned have been fixed, and it has several useful features already, though more development work is ongoing (docs are a bit sparse right now, though -h provides some help).

Why filter-repo vs. filter-branch?
  * filter-branch is extremely to unusably slow (multiple orders of
    magnitude slower than it should be) for non-trivial repositories.
  * filter-branch made a number of usability choices that are okay for
    small repos, but these choices sometimes conflict as more options
    are combined, and the overall usability often causes difficulties
    for users trying to work with intermediate or larger repos.
  * filter-branch is missing some basic features.

The first two are intrinsic to filter-branch's design at this point and cannot be backward-compatibly fixed.

Requirements:
  * Python 2 (for now?)
  * A version of git with en/fast-export-import topic (in master of git.git)
  * A version of git with the --combined-all-names option to diff-tree;
    I have submitted[2] this patch, but it hasn't been picked up yet.

What's the future? (Core command of git.git? place it in contrib? keep it in a separate repo?) I'm hoping to discuss that at the contributor summit today, but feedback on the list is also welcome.

Thanks, Elijah

[1] https://github.com/newren/git-filter-repo; it's a ~2800 line
    single-file python script, depending only on the python standard
    library (and execution of git commands), all of which is designed
    to make build/installation trivial: you just need to add it to
    your $PATH.
[2] https://public-inbox.org/git/20190126221811.20241-1-newren@gmail.com/
Next: Junio C Hamano
Message 1 of 13 in “New command/tool: git filter-repo”
  1. Elijah NewrenJan 31, 2019
  2. Junio C HamanoJan 31, 2019
  3. Elijah NewrenJan 31, 2019
  4. Roberto TyleyJan 31, 2019
  5. Elijah NewrenFeb 1, 2019
  6. Elijah NewrenJan 31, 2019
  7. Elijah NewrenFeb 8, 2019
  8. Johannes SchindelinFeb 8, 2019
  9. Ævar Arnfjörð BjarmasonFeb 8, 2019
  10. Johannes SchindelinFeb 8, 2019
  11. Elijah NewrenFeb 11, 2019
  12. Elijah NewrenFeb 11, 2019
  13. Elijah NewrenJun 8, 2019

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.