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

Question about --tree-filter

From
Sergio Callegari <sergio.callegari@gmail.com>
Date
Feb 4, 2009, 16:08 UTC
Message-ID
<loom.20090204T155824-858@post.gmane.org>
Hi,

in working with the "rezip" filter for the efficient git management of openoffice, zip and docx files, I am encountering the following problem.

Suppose that you have an existing repository and that you want to convert it into a repository using the rezip filters: git filter-branch should be the tool to do the conversion.

Initially I believed that once set up the appropriate .git/config filter entries and a .git/info/attributes file tying the filter to the appropriate file types, it would have been enough to

git filter-branch --tree-filter true tag-name-filter cat

to do the conversion. This is also what I suggested in my original post about the rezip script.

Unfortunately, this does not seem to work as expected. Not all files get rewritten as filtered blobs. The only way to do the right job seems to use a tree-filter that touches every single file in the project.

Any idea why it is so?

Also this is not very nice, because it makes the filter-branch result in a huge amount of work. In other terms, the rezip blob rewriting gets called many many times more than needed with this technique.

Does anybody have some suggestion of a tree filter that would be both "safe" and "efficient" ?

Thanks
Sergio 
Next: Johannes Sixt
Message 1 of 6 in “Question about --tree-filter”
  1. Sergio CallegariFeb 4, 2009
  2. Johannes SixtFeb 4, 2009
  3. Sergio CallegariFeb 4, 2009
  4. Johannes SixtFeb 5, 2009
  5. Sergio CallegariFeb 5, 2009
  6. Johannes SixtFeb 5, 2009

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.