git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avery Pennarun <apenwarr@gmail.com>
To: Asger Ottar Alstrup <asger@area9.dk>
Cc: git@vger.kernel.org, Alexander Gavrilov <angavrilov@gmail.com>
Subject: Re: git subtree as a solution to partial cloning?
Date: Mon, 25 May 2009 11:50:08 -0400	[thread overview]
Message-ID: <32541b130905250850h75f905e0t84287f897600187f@mail.gmail.com> (raw)
In-Reply-To: <8873ae500905250233t52dce5b5v8ca88b9921a88437@mail.gmail.com>

On Mon, May 25, 2009 at 5:33 AM, Asger Ottar Alstrup <asger@area9.dk> wrote:
> On Mon, May 25, 2009 at 9:59 AM, Avery Pennarun <apenwarr@gmail.com> wrote:
>> On Mon, May 25, 2009 at 3:21 AM, Asger Ottar Alstrup <asger@area9.dk> wrote:
>>> Does git subtree support splitting at the file level, or only at directory
>>> level?
>>
>> Currently only at the directory level.  In theory, there's nothing
>> stopping us from working with any subset of files... but it's really
>> much simpler this way (both to code and to explain) so I'd much rather
>> leave it as is.  Can you reorganize your tree so that you divide the
>> needed files into different subdirectories?
>
> No, that is unfortunately not so easy. If we could, I suppose we could
> use submodules instead.

Your only option may be to use git filter-branch then.  It lets you do
pretty much anything you want, although merging it back together again
could be entertaining.  (Making it correctly mergeable is by far the
trickiest part of git-subtree.)

> Are the subtree split and merge operations effective? I.e. how do they
> scale with the size of the original and reduced repositories? I.e. is
> it feasible to use hooks to automate the splitting and merging
> whenever there are changes in the original or reduced repositories?

git subtree manipulates only commit objects (and a reference to the
single tree object representing the subtree in each commit) so it's
very fast and doesn't depend on file sizes or number of files.
Basically git subtree split is O(n) in the number of *commits* since
the most recent split.

Have fun,

Avery

  reply	other threads:[~2009-05-25 15:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8873ae500905250021p20e7096dwf5bc71c36c4047b@mail.gmail.com>
2009-05-25  7:59 ` git subtree as a solution to partial cloning? Avery Pennarun
2009-05-25  9:33   ` Asger Ottar Alstrup
2009-05-25 15:50     ` Avery Pennarun [this message]
2009-05-25 17:35       ` Asger Ottar Alstrup
2009-05-25 17:54         ` Avery Pennarun
2009-05-25 18:28           ` Asger Ottar Alstrup
2009-05-25 19:18             ` Avery Pennarun
2009-05-25 23:26             ` Jakub Narebski
2009-05-25  7:35 Asger Ottar Alstrup

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=32541b130905250850h75f905e0t84287f897600187f@mail.gmail.com \
    --to=apenwarr@gmail.com \
    --cc=angavrilov@gmail.com \
    --cc=asger@area9.dk \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).