From: "Jakub Narębski" <jnareb@gmail.com>
To: Marc Branchaud <marcnarc@xiplink.com>,
Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] clone: --dissociate option to mark that reference is only temporary
Date: Fri, 17 Oct 2014 14:47:07 +0200 [thread overview]
Message-ID: <54410FCB.6070908@gmail.com> (raw)
In-Reply-To: <543FE3BE.9010307@xiplink.com>
On 2014-10-16 17:26, Marc Branchaud wrote:
> I just don't see what difference the --borrow option makes. Consider the two
> cases:
>
> With just --reference=/local/pool/linux.git:
> 1. Set up the alternates file with that path.
x. Fetch object from origin not present in pool
> 2. Copy gko's refs into refs/remotes/origin/.
> 3. Set up refs/heads/master to refer to gko's HEAD.
> 4. Checkout refs/heads/master (uses objects from local pool).
>
> With both that --reference and --borrow=../my/neighbour/linux-hack.git:
> 1. Set up the alternates file with both paths.
x. Fetch objects from origin not present in either pool
or neighbour repo ("have" pool and neighbour)
> 2. Copy gko's refs into refs/remotes/origin/.
> 3. Set up refs/heads/master to refer to gko's HEAD.
> 4. Checkout refs/heads/master (uses objects from local pool).
> 5. Disassociate ourselves from the neighbour repo.
which means roughly:
5.1. Remove neighbour repo from alternates
5.2. Fetch required objects from neighbour repo
("want" neighbour, have ???)
It is possible that because of technical limitations --reference and
--borrow / dissociate / --temporary-reference / --object-cache are to be
mutually exclusive.
> In both cases the first four actions have no need of the neighbour repo. The
> second case's fifth action surgically removes the neighbour as an alternate
> object store, and we're left with the same clone we got in the first case.
> What was the point?
You are missing fetching object from your list of actions.
> It seems that in order to make something like --borrow useful, "git clone"
> would somehow need to know which of the neighbour's refs you want to *also*
> clone, then copy any unique objects from the neighbour before disassociating
> from it.
>
> M.
--
Jakub Narębski
next prev parent reply other threads:[~2014-10-17 12:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-14 19:57 [PATCH] clone: --dissociate option to mark that reference is only temporary Junio C Hamano
2014-10-15 14:34 ` Marc Branchaud
2014-10-15 17:29 ` Junio C Hamano
2014-10-15 20:51 ` Marc Branchaud
2014-10-15 21:33 ` Junio C Hamano
2014-10-15 21:44 ` Marc Branchaud
2014-10-15 21:50 ` Junio C Hamano
2014-10-16 15:26 ` Marc Branchaud
2014-10-17 12:47 ` Jakub Narębski [this message]
2014-10-16 19:27 ` Junio C Hamano
2014-10-15 19:44 ` Johannes Sixt
2014-10-15 21:33 ` 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=54410FCB.6070908@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=marcnarc@xiplink.com \
/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.