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
Junio C Hamano <gitster@pobox.com>
Date
Oct 16, 2014, 19:27 UTC
Message-ID
<xmqqegu7u85m.fsf@gitster.dls.corp.google.com>
In-Reply-To
<xmqqwq81w8az.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 24 quoted lines
> Marc Branchaud <marcnarc@xiplink.com> writes:
>
>> I think things would be more understandable if the option was "--dissociate
>> <repository>" and was an explicit alternative to --reference:
>> 	[[--reference | --dissociate] <repository>]
>>
>> I'm still not liking the name "--dissociate" though.  The original suggestion
>> of "--borrow" is better.  Perhaps "--library" or "--local-cache"?  I dunno...
>
> I was not thinking when I originally started the topic with
> "--borrow", until I realized that it would not make much sense,
> primarily because we allow multiple references.
>
> What should this command line do, and how would you implement such a
> behaviour?
>
>     $ 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.

Another approach we could take is to add --borrow and then forbid mixing --reference and --borrow on the same command line, until somebody comes up with an implementation to allow us dissociate from borrowed repositories while still depending on referenced ones, at which time we can lift that limitation.

But if that future extension is not going to happen, there is not much difference. The end result will be either

 - the one that is very clear to the users that they cannot
   selectively dissociate because there is no such option documented
   (i.e. --reference, --dissociate and no --borrow); and
 - the other one that gives a slight hope to the users that the
   combination might work (i.e. with --reference, --borrow and no
   --dissociate) but refuses to do so when it actually is run.

Between the two, the former might actually be easier to the users to understand, as it keeps their expectation in line with the reality.

So I dunno.

I certainly am *not* going to do the selective dissociation change myself. Do we have a volunteer (hint: this probably does not fall into "low-hanging fruit" category)?

Previous: Jakub NarębskiNext: Johannes Sixt
Message 10 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.