git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git filter-branch --subdirectory-filter, still a mistery
@ 2008-08-06 13:39 Jan Wielemaker
  2008-08-07  7:13 ` Jan Wielemaker
  2008-08-07  7:50 ` Thomas Rast
  0 siblings, 2 replies; 40+ messages in thread
From: Jan Wielemaker @ 2008-08-06 13:39 UTC (permalink / raw)
  To: git

Hi,

I've been puzzling most of today to do something that must be simple.
I've got a big repo which contains a project with several nicely related
subprojects in directories. Only now, we want to share some of these
subprojects with another project. I.e. they must start to live there own
life. Of course, I would like to keep the history. So, I did (git --version:
1.5.6.GIT):

	% git clone /home/git/pl.git
	% cd pl
	% git filter-branch --subdirectory-filter packages/chr HEAD

This indeed creates a nice directory holding only the contents of
packages/chr.  But, starting qgit I see that all commits, also those
that had absolutely nothing to do with this dir are still there.  Also,
all tags are still there with exactly the same SHA1 as the original.
I'd expect the tags to be rewritten such that their SHA1 refers to the
state of this single directory and its contents!?  Of course, these
tags give me access to everything, so the repository doesn't shrink
much too.

I must be missing something important ...  I found similar complaints,
but few decent answers and the few answer I did find appeared outdated.
The one at http://use.perl.org/~rjbs/journal/34411 comes closest, although
the reset --hard is no longer needed and the copying and gc-ing doesn't
help much anymore.

Should I write a tree-filter that removes all but the directory I want 
to keep?  I.e. something like this?  Feels like and overkill and I fear
I'll have a lot of empty commits left.

	'mv packages/chr .. && rm -r * && mv ../chr/* . && rmdir ../chr'

I'll be grateful for a clue!

	Cheers --- Jan

^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2008-09-14 16:31 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-06 13:39 git filter-branch --subdirectory-filter, still a mistery Jan Wielemaker
2008-08-07  7:13 ` Jan Wielemaker
2008-08-07  7:50 ` Thomas Rast
2008-08-07 10:14   ` Jan Wielemaker
2008-08-07 23:48     ` Thomas Rast
2008-08-07 23:50       ` [PATCH] filter-branch: be more helpful when an annotated tag changes Thomas Rast
2008-08-08 20:10         ` [TOY PATCH] filter-branch: add option --delete-unchanged Thomas Rast
2008-08-09  0:35           ` Johannes Schindelin
2008-08-11 10:43           ` Jan Wielemaker
2008-09-14 16:29           ` Felipe Contreras
2008-08-07 23:54       ` [RFH] filter-branch: ancestor detection weirdness Thomas Rast
2008-08-08 11:42         ` Johannes Schindelin
2008-08-08 14:14           ` Thomas Rast
2008-08-08 14:16             ` [PATCH] filter-branch: fix ancestor discovery for --subdirectory-filter Thomas Rast
2008-08-08 14:39             ` [RFH] filter-branch: ancestor detection weirdness Johannes Schindelin
2008-08-08 18:37               ` Thomas Rast
2008-08-08 18:39                 ` [PATCH v2] filter-branch: fix ref rewriting with --subdirectory-filter Thomas Rast
2008-08-09  0:16                 ` [RFH] filter-branch: ancestor detection weirdness Johannes Schindelin
2008-08-09  1:25                   ` Junio C Hamano
2008-08-09  9:25                     ` Thomas Rast
2008-08-09  9:35                       ` Thomas Rast
2008-08-10 14:02                     ` [PATCH] filter-branch: use --simplify-merges Thomas Rast
2008-08-12  1:54                       ` Junio C Hamano
2008-08-12  2:13                         ` Junio C Hamano
2008-08-12  5:47                           ` Thomas Rast
2008-08-12  6:59                             ` Junio C Hamano
2008-08-12  8:45                               ` [PATCH 0/3] filter-branch --subdirectory-filter improvements Thomas Rast
2008-08-12 12:11                                 ` Jan Wielemaker
2008-08-12  8:45                               ` [PATCH 1/3] filter-branch: Extend test to show rewriting bug Thomas Rast
2008-08-12  8:45                               ` [PATCH 2/3] filter-branch: fix ref rewriting with --subdirectory-filter Thomas Rast
2008-08-12  8:45                               ` [PATCH 3/3] filter-branch: use --simplify-merges Thomas Rast
2008-08-12  8:18                     ` [RFH] filter-branch: ancestor detection weirdness Petr Baudis
2008-08-12 18:33                       ` Junio C Hamano
2008-08-09 10:00                   ` Thomas Rast
2008-08-12 21:33                     ` Junio C Hamano
2008-08-12 22:15                       ` Thomas Rast
2008-08-08  7:44       ` git filter-branch --subdirectory-filter, still a mistery Jan Wielemaker
2008-08-08 11:25       ` Jan Wielemaker
2008-08-07 14:04   ` [PATCH] Documentation: filter-branch: document how to filter all refs Thomas Rast
2008-08-07 14:16     ` [PATCH v2] " Thomas Rast

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).