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

Re: Performance issue exposed by git-filter-branch

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Dec 17, 2010, 03:08 UTC
Message-ID
<20101217030855.GB7003@burratino>
In-Reply-To
<9A686258-A504-4CBB-9993-048B45B5EE6A@irridia.com>
Ken Brownfield wrote:
> I had considered this approach (and the one mentioned by Jonathan)
> but there are no git tools to actually perform the filter I wanted
> on the export in this form.

Keep in mind that the two suggestions were subtly different from one another.

For the "filter fast-import stream" technique, apparently there is a tool called reposurgeon[1] to do that. git_fast_filter[2] has the same purpose, too, if I remember correctly.

For the unpack-trees avoidance technique, true, the only example I know if is the one I mentioned[3]. The idea would be to sort the commits you want in topological order and replay them, for each one going like so:

	M 040000 <old tree id> ""
	D bad/directory/one
	D bad/directory/two

using fast-import from git.git master. (Older versions of fast-import do not properly handle replacing the root directory, so if that sort of compatibility is important, you'd have to use a directory listing and fill in all the _good_ directories instead.)

I'd be glad to look at any work in this direction. Something like it would be useful for postprocessing when importing from svn repos.

Thanks, Jonathan

[1] http://esr.ibiblio.org/?p=2718 [2] http://thread.gmane.org/gmane.comp.version-control.git/116028 and links therein [3] http://thread.gmane.org/gmane.comp.version-control.git/158375

Previous: Ken BrownfieldNext: Elijah Newren
Message 10 of 15 in “Performance issue exposed by git-filter-branch”
  1. Ken BrownfieldDec 17, 2010
  2. Jonathan NiederDec 17, 2010
  3. Ken BrownfieldDec 17, 2010
  4. Jonathan NiederDec 17, 2010
  5. Jonathan NiederDec 17, 2010
  6. Thomas RastDec 17, 2010
  7. Ken BrownfieldDec 17, 2010
  8. Jakub NarebskiDec 17, 2010
  9. Ken BrownfieldDec 21, 2010
  10. Jonathan NiederDec 17, 2010
  11. Elijah NewrenDec 17, 2010
  12. Ken BrownfieldFeb 4, 2011
  13. Elijah NewrenFeb 5, 2011
  14. Nguyen Thai Ngoc DuyDec 17, 2010
  15. Ken BrownfieldDec 21, 2010

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.