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
Jakub Narębski <jnareb@gmail.com>
Date
Oct 17, 2014, 12:47 UTC
Message-ID
<54410FCB.6070908@gmail.com>
In-Reply-To
<543FE3BE.9010307@xiplink.com>
On 2014-10-16 17:26, Marc Branchaud wrote:
Show 5 quoted lines
> 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
Show 6 quoted lines
> 	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.
Show 6 quoted lines
> 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
Previous: Marc BranchaudNext: Junio C Hamano
Message 9 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.