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

Re: [PATCH] Teach filter-branch about subdirectory filtering

From
Alex Riesen <raa.lkml@gmail.com>
Date
Jun 8, 2007, 21:05 UTC
Message-ID
<20070608210505.GA3025@steel.home>
In-Reply-To
<Pine.LNX.4.64.0706080130000.4046@racer.site>
Johannes Schindelin, Fri, Jun 08, 2007 02:30:35 +0200:
Show 7 quoted lines
> 
> With git-filter-branch --subdirectory-filter <subdirectory> you can
> get at the history, as seen by a certain subdirectory. The history
> of the rewritten branch will only contain commits that touched that
> subdirectory, and the subdirectory will be rewritten to be the new
> project root.
> 
Maybe it could be made more general
    --subdirectory-filter <from> [--subdirectory-filter-to <to>]

<to> meaning root by default, and allow multiple filters to be set? You would have to deal with file name conflicts in case some filters refer to the same target directory, though.

It has already been asked how to split a project into many projects based on directory boundaries. That'd help...

Previous: Johannes Sixt
Message 7 of 7 in “Teach filter-branch about subdirectory filtering”
  1. Teach filter-branch about subdirectory filteringJohannes Schindelin, Jun 8, 2007
  2. Junio C HamanoJun 8, 2007
  3. Johannes SchindelinJun 8, 2007
  4. Johannes SixtJun 8, 2007
  5. Johannes SchindelinJun 8, 2007
  6. Johannes SixtJun 8, 2007
  7. Alex RiesenJun 8, 2007

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.