git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] clone: --dissociate option to mark that reference is only temporary

From
Marc Branchaud <marcnarc@xiplink.com>
Date
Oct 15, 2014, 21:44 UTC
Message-ID
<543EEAC4.8070204@xiplink.com>
In-Reply-To
<xmqqsiipuifi.fsf@gitster.dls.corp.google.com>
On 14-10-15 05:33 PM, Junio C Hamano wrote:
Show 33 quoted lines
> Marc Branchaud <marcnarc@xiplink.com> writes:
> 
>> On 14-10-15 01:29 PM, Junio C Hamano wrote:
>>
>>>     $ git clone \
>>>         --reference=/local/pool/linux.git \
>>>         --borrow=../my/neighbour/linux-hack.git \
>>>         git://git.kernel.org/...../linux.git
>>>
>>> With "do the usual --reference thing, but then dissociate the result
>>> from referents" option, there is no ambiguity and that is why I did
>>> not go with the "--borrow" option suggested in the original thread.
>>
>> I had not considered this case.  My limited imagination has a hard time
>> coming up with a scenario where more than one --reference (or
>> In this example, the --borrow seems
>> useless.  How would clone decide that it even needed objects from the
>> neighbour repo?  None of the refs on gko need any of the neighbour's unique
>> objects.
> 
> A probable scenario might go like this.
> 
>     The company-wide pool is designed for everybody's use and will
>     stay, even if it lags behind because it fetches every other day,
>     so it is safe to keep referring to via alternates.  My neighbour
>     is following the linux-next repository and has changes that are
>     meant to land "in the future" to the mainline, but it can
>     disappear without notice so I cannot afford to depend on its
>     presense forever.
> 
> Under that particular scenario, what should happen is fairly clear;
> we want to dissociate from neibour's immediately after clone is
> done, while being still dependent on the shared pool.

Yes, but we're cloning gko, not the neighbour. Doesn't that mean that the clone operation won't know about any of the neighbour's refs? In order to get any of the neighbour's refs (and its unique objects) you have to either clone the neighbour directly or (post-clone) fetch from it, no?

		M.
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 12 in “clone: --dissociate option to mark that reference is only temporary”
  1. clone: --dissociate option to mark that reference is only temporaryJunio C Hamano, Oct 14, 2014
  2. Marc BranchaudOct 15, 2014
  3. Junio C HamanoOct 15, 2014
  4. Marc BranchaudOct 15, 2014
  5. Junio C HamanoOct 15, 2014
  6. Marc BranchaudOct 15, 2014
  7. Junio C HamanoOct 15, 2014
  8. Marc BranchaudOct 16, 2014
  9. Jakub NarębskiOct 17, 2014
  10. Junio C HamanoOct 16, 2014
  11. Johannes SixtOct 15, 2014
  12. Junio C HamanoOct 15, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.