Re: Pushing and pulling the result of `git replace` and objects/info/alternates

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

 



On 05/24/2015 07:28 AM, Christian Couder wrote:
> Hi,
>
> On Fri, May 22, 2015 at 4:38 PM, Stephen Kelly <steveire@xxxxxxxxx> 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.

--
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]