From: Junio C Hamano <gitster@pobox.com>
To: Marc Branchaud <marcnarc@xiplink.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] clone: --dissociate option to mark that reference is only temporary
Date: Thu, 16 Oct 2014 12:27:49 -0700 [thread overview]
Message-ID: <xmqqegu7u85m.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <xmqqwq81w8az.fsf@gitster.dls.corp.google.com> (Junio C. Hamano's message of "Wed, 15 Oct 2014 10:29:24 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> 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)?
next prev parent reply other threads:[~2014-10-16 19:27 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
2014-10-16 19:27 ` Junio C Hamano [this message]
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=xmqqegu7u85m.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--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.