From: Ryan Anderson <ryan@michonline.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Petr Baudis <pasky@suse.cz>,
Mathias Waack <Mathias.Waack@rantzau.de>,
git@vger.kernel.org
Subject: Re: Joining Repositories
Date: Wed, 18 Jan 2006 13:55:50 -0500 [thread overview]
Message-ID: <43CE8F36.3090100@michonline.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0601180813170.3240@g5.osdl.org>
[-- Attachment #1: Type: text/plain, Size: 1594 bytes --]
Linus Torvalds wrote:
>
> On Wed, 18 Jan 2006, Ryan Anderson wrote:
>
>>Assuming both repositories are clean, no extraneous files, and without
>>testing, of course:
>>
>>In r1:
>> mkdir r1
>> # move everything into the subdirectory called r1.
>> git mv $(ls -a | grep -v -e ^.git$ -e ^r1$) r1/
>> git commit -a "Restructure directory"
>>
>>In r2:
>> mkdir r2
>> # move all files into r2/
>> git mv $(ls -a | grep -v -e ^.git$ -e ^r2$) r2/
>> git commit -a "Restructure directory"
>>
>> git fetch ../r1/
>> GIT_INDEX_FILE=.git/tmp-index git-read-tree FETCH_HEAD
>> GIT_INDEX_FILE=.git/tmp-index git-checkout-cache -a -u
>> git-update-cache --add -- $(GIT_INDEX_FILE=.git/tmp-index git-ls-files)
>> cp .git/FETCH_HEAD .git/MERGE_HEAD
>> git commit
>>
>>No history rewritten,
>
>
> Right.
>
>
>>merging with the old repositories should, at least theoretically, work,
>>etc.
>
>
> No. This - and the history rewriting - both have a fundamental problem: it
> becomes totally impossible to merge back any changes of the subprojects,
> at least automatically. The renaming just ends up making pretty much any
> merge a manual affair (git can _help_, but it's going to be a matter of
> luck if it works or not - and it usually won't work very well, because
> you'll probably end up having files that have the same name in the new and
> the old repo, and eventually you'll just have tons of confusion).
What I meant was that an old repository can continue to be developed in,
and, in theory, the recursive merge should be able to merge those
changes into this new, joined, repository.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2006-01-18 18:56 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-18 12:25 Joining Repositories Mathias Waack
2006-01-18 12:51 ` Petr Baudis
2006-01-18 12:58 ` Petr Baudis
2006-01-18 14:01 ` Mathias Waack
2006-01-18 14:14 ` Petr Baudis
2006-01-19 11:36 ` Mathias Waack
2006-01-19 18:24 ` Junio C Hamano
2006-01-18 14:14 ` Andreas Ericsson
2006-01-18 14:09 ` Ryan Anderson
2006-01-18 14:21 ` Petr Baudis
2006-01-18 14:39 ` Ryan Anderson
2006-01-18 16:23 ` Linus Torvalds
2006-01-18 17:05 ` Petr Baudis
2006-01-18 17:33 ` Junio C Hamano
2006-01-18 18:03 ` Linus Torvalds
2006-01-18 17:30 ` Junio C Hamano
2006-01-18 18:22 ` Linus Torvalds
2006-01-18 19:09 ` Junio C Hamano
2006-01-18 20:09 ` Linus Torvalds
2006-01-18 22:47 ` Linus Torvalds
2006-01-18 23:15 ` Linus Torvalds
2006-01-19 2:12 ` Junio C Hamano
2006-01-19 9:03 ` Petr Baudis
2006-01-18 18:55 ` Ryan Anderson [this message]
2006-01-18 16:38 ` H. Peter Anvin
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=43CE8F36.3090100@michonline.com \
--to=ryan@michonline.com \
--cc=Mathias.Waack@rantzau.de \
--cc=git@vger.kernel.org \
--cc=pasky@suse.cz \
--cc=torvalds@osdl.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).