Re: Subtree merging of sub-directories between repositories?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Aug 2, 2009 at 2:05 PM, <skillzero@xxxxxxxxx> wrote:
> On Sun, Aug 2, 2009 at 1:30 AM, Avery Pennarun<apenwarr@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]