On Aug 30, 3:57 pm, Haasip Satang <haasip.sat...@googlemail.com> wrote: > I found something that might be interesting. To me the problem seems to be > the way the pack files are constructed. > > I checked what happened with git log and what I get is the following: > > /lhome/gitadmin/repo/main> git log > > > > > > > commit 214baf2cea19d66e3a1817e8e6aa4883294be05f > > Merge: ac974b0 8ad7c91 > > Author: gitadmin <gitadmin@gitrepo> > > Date: Wed Aug 29 13:02:42 2012 +0200 > > Split 'xyz/' into commit '*8ad7c91aef6a4814fce80ab6e092fe7eeedc8090*' > > git-subtree-dir: xyz > > git-subtree-mainline: *ac974b0c9ac110a85c6f58fb460ee54a64992bda* > > git-subtree-split: *8ad7c91aef6a4814fce80ab6e092fe7eeedc8090* > > commit *ac974b0c9ac110a85c6f58fb460ee54a64992bda* > > Author: gitadmin <gitadmin@gitrepo> > > Date: Wed Aug 29 13:02:07 2012 +0200 > > initial commit importing everything > > commit 8ad7c91aef6a4814fce80ab6e092fe7eeedc8090 > > Author: gitadmin <gitadmin@gitrepo> > > Date: Wed Aug 29 13:02:07 2012 +0200 > > [xyz] initial commit importing everything > > So interesting parts are the highlighted SHAs. So the subtree command > actually does create a synthetic commit (8ad7c91). > > I checked the contents of this commit with: > > git cat-file 8ad7c91aef6a4814fce80ab6e092fe7eeedc8090 > > and saw that it only points to one tree object --> 0f201238. This tree > object is the folder of only the files / subtree I need. So the commit > contains EXACTLY what I want to have. > > So why does it not work? Here the interesting part (that I still don't > get): > > When I clone that subtree branch using file:// git is smart enough to > repack and create a separate pack file that only contains what I need / > what the commit is pointing to.