From: Avery Pennarun <apenwarr@gmail.com>
To: skillzero@gmail.com
Cc: git@vger.kernel.org
Subject: Re: Subtree merging of sub-directories between repositories?
Date: Sun, 2 Aug 2009 14:53:31 -0400 [thread overview]
Message-ID: <32541b130908021153j28872a34v84dccfdfbc99b607@mail.gmail.com> (raw)
In-Reply-To: <2729632a0908021105m10bfb8ddx700464d06fd38023@mail.gmail.com>
On Sun, Aug 2, 2009 at 2:05 PM, <skillzero@gmail.com> wrote:
> On Sun, Aug 2, 2009 at 1:30 AM, Avery Pennarun<apenwarr@gmail.com> wrote:
>> 2) Use "git subtree split" to take the subdir of A and give it a
>> history of its own, then merge that history into a subdir of B (using
>> "git subtree add" or any other subtree merge method you want to use).
>> You can then git subtree split/merge back and forth between A and B in
>> the future to copy future changes from one to the other.
>
> Thanks for the help. I tried #2 and it sort of worked. The history was
> imported, but the resulting paths were flattened. Here's what I did:
[...]
> The full history doesn't seem to be associated with that directory. If
> I do 'git log --name-only --topo-order', I see the full history, but
> the files are listed as:
>
> file.c
>
> and I was expecting to see:
>
> X/Y/C/file.c
>
> Because I'd want to be able to do 'git log X/Y/C' and see all the
> commits that affect that directory.
Yeah, this is a tricky one. Git has all the necessary information to
"know" that the files were "moved" from file.c (in the subtree project
history) to X/Y/C.file.c (in your superproject). But "git log"
doesn't use this information for anything at the moment, and
"--follow" doesn't seem to make it work.
Since I don't have the required skills or knowledge to fix git's
history following, my hope is that this will magically start working
in a future version of git because someone like you gets annoyed with
it :)
Have fun,
Avery
prev parent reply other threads:[~2009-08-02 18:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-02 6:37 Subtree merging of sub-directories between repositories? skillzero
2009-08-02 8:30 ` Avery Pennarun
2009-08-02 18:05 ` skillzero
2009-08-02 18:53 ` Avery Pennarun [this message]
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=32541b130908021153j28872a34v84dccfdfbc99b607@mail.gmail.com \
--to=apenwarr@gmail.com \
--cc=git@vger.kernel.org \
--cc=skillzero@gmail.com \
/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).