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

Re: [PATCH 0/3] filter-branch --subdirectory-filter improvements

From
JWJan Wielemaker <j.wielemaker@uva.nl>
Date
Aug 12, 2008, 12:11 UTC
Message-ID
<200808121411.06452.J.Wielemaker@uva.nl>
In-Reply-To
<cover.1218529494.git.trast@student.ethz.ch>
On Tuesday 12 August 2008 10:45:56 am Thomas Rast wrote:
Show 7 quoted lines
> Junio C Hamano wrote:
> > Anything parked in 'pu' is a fair game for replacement later, so please
> > send a replacement series and tell me to drop the previous ones from
> > 'pu'.
>
> So let's try this one.  The first two do not depend on
> --simplify-merges.

And I can confirm that (2) is a very important fix and (3) is a necessary step to achieve what I believe --subdirectory-filter is meant for: extract a directory from a big project and turn it into stand-alone project. In this case I want:

	% filter out dir X, creating X.git
	% git rm -r X
	% git submodule add <url> X

And someone with a totally unrelated project adds X.git to his project. That requires the history of X to become totally independent from the original project.

This works great with Thomas' patches.
	Cheers --- Jan
P.s.	Note that this is a common problem for people moving from some
	unnamed ancient SCM system, either transferring a repository or
	simply starting the wrong way due to historical brainwashing :-)
Show 27 quoted lines
> 1/3 is new, and extends the --subdirectory-filter test to prove the
> existence of the bug in current filter-branch.  I hope it helps
> explain the issue.
>
> 2/3 is the same as before[*] modulo changing the test to expect
> success again.
>
> The third one does depend on --simplify-merges.
>
> 3/3 introduces --simplify-merges, which improves the history that
> results from --subdirectory-filter.  It has absolutely nothing to do
> with 2/3, except that it touches the same area of code.  (You could
> s/rev-list/rev-list --simplify-merges/ in master:git-filter-branch.sh,
> and get the improved history without the bugfix.)
>
> Sorry that I dispersed the patches and v2s randomly across the thread.
>
> - Thomas
>
> [*] http://kerneltrap.org/mailarchive/git/2008/8/8/2867244
> "[PATCH v2] filter-branch: fix ref rewriting with --subdirectory-filter"
>
>
> Thomas Rast (3):
>   filter-branch: Extend test to show rewriting bug
>   filter-branch: fix ref rewriting with --subdirectory-filter
>   filter-branch: use --simplify-merges
Previous: Thomas Rast
Message 5 of 5 in “filter-branch --subdirectory-filter improvements”
  1. 0/3 filter-branch --subdirectory-filter improvementsThomas Rast, Aug 12, 2008
  2. 1/3 filter-branch: Extend test to show rewriting bugThomas Rast, Aug 12, 2008
  3. 2/3 filter-branch: fix ref rewriting with --subdirectory-filterThomas Rast, Aug 12, 2008
  4. 3/3 filter-branch: use --simplify-mergesThomas Rast, Aug 12, 2008
  5. Jan WielemakerAug 12, 2008

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.