All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Andrew Keller <andrew@kellerfarm.com>, Git List <git@vger.kernel.org>
Subject: Re: Borrowing objects from nearby repositories
Date: Tue, 25 Mar 2014 10:02:23 -0700	[thread overview]
Message-ID: <xmqqtxammctc.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CACBZZX5teZuqtNkPT4PdXJn=g34cOhRH2oNehROT8kJ_M2cgfg@mail.gmail.com> ("Ævar Arnfjörð Bjarmason"'s message of "Mon, 24 Mar 2014 22:21:03 +0100")

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

>> 1) Introduce '--borrow' to `git-fetch`.  This would behave similarly
> to '--reference', except that it operates on a temporary basis, and
> does not assume that the reference repository will exist after the
> operation completes, so any used objects are copied into the local
> objects database.  In theory, this mechanism would be distinct from
> --reference', so if both are used, some objects would be copied, and
> some objects would be accessible via a reference repository referenced
> by the alternates file.
>
> Isn't this the same as git clone --reference <path> --no-hardlinks
> <url> ?
>
> Also without --no-hardlinks we're not assuming that the other repo
> doesn't go away (you could rm-rf it), just that the files won't be
> *modified*, which Git won't do, but you could manually do with other
> tools, so the default is to hardlink.

I think that the standard practice with the existing toolset is to
clone with reference and then repack.  That is:

    $ git clone --reference <borrowee> git://over/there mine
    $ cd mine
    $ git repack -a -d

And then you can try this:

    $ mv .git/objects/info/alternates .git/objects/info/alternates.disabled
    $ git fsck

to make sure that you are no longer borrowing anything from the
borrowee.  Once you are satisfied, you can remove the saved-away
alternates.disabled file.

  parent reply	other threads:[~2014-03-25 17:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-12  3:37 Borrowing objects from nearby repositories Andrew Keller
2014-03-23 18:04 ` Phil Hord
2014-03-24 21:21 ` Ævar Arnfjörð Bjarmason
2014-03-25 13:13   ` Andrew Keller
2014-03-25 17:02   ` Junio C Hamano [this message]
2014-03-25 22:17     ` Junio C Hamano
2014-03-26 13:36       ` Andrew Keller
2014-03-26 17:29         ` Junio C Hamano
2014-03-28 14:52           ` Andrew Keller
2014-03-28 17:02             ` Junio C Hamano

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=xmqqtxammctc.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=andrew@kellerfarm.com \
    --cc=avarab@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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.