From: Stephen Kelly <steveire@gmail.com>
To: Christian Couder <christian.couder@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: Pushing and pulling the result of `git replace` and objects/info/alternates
Date: Mon, 25 May 2015 11:49:17 +0200 [thread overview]
Message-ID: <5562F01D.8000601@gmail.com> (raw)
In-Reply-To: <CAP8UFD3G8_ChRX6HHtieFTksUJBiXu9FLNbewFQVj7qPyGh8EQ@mail.gmail.com>
On 05/24/2015 07:28 AM, Christian Couder wrote:
> Hi,
>
> On Fri, May 22, 2015 at 4:38 PM, Stephen Kelly <steveire@gmail.com> wrote:
>> I have tried out using `git replace --graft` and
>> .git/objects/info/alternates to 'refer to' the history in the origin
>> repo instead of 'duplicating' it. This is similar to how Qt5 repos
>> refer to Qt 4 history in a different repo.
>>
>> Question 1) Is this a reasonable thing to do for this scenario?
> I think it should work without too much work, but see the answer to
> the next question.
Ok, thanks. The concern is that there is plenty of documentation for
git-filter-branch, but no documentation or porcelain for info/alternates
and little out on the internet about it or git replace and using them
together.
However, it seems to be a reasonable thing to do.
>> echo "../../calculator/objects" >
>> ../.git/modules/compute/objects/info/alternates
>> git replace --graft HEAD $extraction_sha
> Maybe use the following instead of the above line:
>
> git fetch 'refs/replace/*:refs/replace/*'
Thanks.
>> # And now we see the history from the calculator repo. Great. But, it
>> required user action after the clone.
> Yeah, but if the 2 above commands are in a script maybe it's
> reasonable to ask the user to launch the script once after cloning.
Would it be possible to do this in a hook in the 'integration repo'
which contains both submodules in the example I posted? Like a fetch
hook or something?
Thanks,
Steve.
next prev parent reply other threads:[~2015-05-25 9:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-22 14:38 Pushing and pulling the result of `git replace` and objects/info/alternates Stephen Kelly
2015-05-24 5:28 ` Christian Couder
2015-05-25 9:49 ` Stephen Kelly [this message]
2015-05-25 10:28 ` Christian Couder
[not found] ` <CACHsx4LDrU7DET-QAMsZE9+-7BmVbu-T0zLf7Nm8E9qX518rGQ@mail.gmail.com>
[not found] ` <CAP8UFD2ZYYkjFvZGF_ChQhjZRuCmBZ2qKvoLhAoDHYUJ5A07+A@mail.gmail.com>
2015-05-26 14:10 ` Stephen Kelly
2015-05-26 15:14 ` Christian Couder
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5562F01D.8000601@gmail.com \
--to=steveire@gmail.com \
--cc=christian.couder@gmail.com \
--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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).