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

Re: git help clone: questions

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 7, 2018, 22:45 UTC
Message-ID
<xmqq4llrzer5.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<81c78c4f-b690-d06c-bb7d-9c65e33777b5@projektwerkstatt.de>
kalle <kalle@projektwerkstatt.de> writes:
Show 20 quoted lines
> Am 06.03.2018 um 02:36 schrieb Junio C Hamano:
>> kalle <kalle@projektwerkstatt.de> writes:
>> 
>>> -In the explanation of the option --reference: shouldn't there be
>>> written '<repository>' instead of  'reference repository'?
>> 
>> "Shouldn't X be Y?" is not an effective way to communicate; it
>> solicits a "no, the current one is fine." without any explanation.
>> 
>> If you think X should be Y for some reason, please say "I think X
>> should be Y BECAUSE Z" instead.  Without stating why you think
>> differently from what those who wrote the current text, it is hard
>> for people to respond either with "Yeah, you're right---I agree
>> with Z" or with "No, Z does not hold because..."
>> 
> I wrote this, because when it is written about 'reference repository', I
> consider it not totally clear, which repository is meant, as the option
> '--reference <repository>' only names one as <repository>.
> For reasons of clearness, I now propose writing "reference repository
> <repository>".

I do not have particularly a strong opinion, but I think it is very sensible to call the value given to the option "--reference" with a phrase that is not just "repository".

As the command line of "clone" must name one repository (i.e. the one which we clone from), and its "--reference" option must name another repository as its value (i.e. the one that we borrow from in order to reduce the object transfer), calling both <repository> makes it easier to confuse readers unless the writer carefully makes sure that <repository> in the desription is unambiguous and it is clear which one of these two repositories is being discussed by the context.

I just re-read the existing Documentation/git-clone.txt and looked for "reference". All uses of "reference repository" in the prose made sense and I found it would not be an improvement if any of them is replaced with just "repository". It may be helpful to add something like:

	 --reference[-if-able] <repository>::
	+	Define a repository (reference repository) to borrow
	+	objects from.  
		If the reference repository is on the local machine,
		...
to define which repository we mean by that term, though.
Previous: kalleNext: kalle
Message 4 of 5 in “git help clone: questions”
  1. kalleMar 5, 2018
  2. Junio C HamanoMar 6, 2018
  3. kalleMar 7, 2018
  4. Junio C HamanoMar 7, 2018
  5. kalleMar 7, 2018

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.