git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Philip Oakley <philipoakley@iee.email>
To: Junio C Hamano <gitster@pobox.com>
Cc: GitList <git@vger.kernel.org>
Subject: Re: [PATCH v1] config/branch: state that <name>.merge is the remote ref
Date: Sat, 19 Oct 2019 16:19:00 +0100	[thread overview]
Message-ID: <1060efbc-8776-b14c-a1a6-36c03c917059@iee.email> (raw)
In-Reply-To: <xmqq8sphodi6.fsf@gitster-ct.c.googlers.com>

Hi Junio,
On 19/10/2019 00:11, Junio C Hamano wrote:
> Philip Oakley <philipoakley@iee.email> writes:
>
>> branch.<name>.merge::
>>      Defines, for the local branch <name>, the upstream branch ref
>>      _on the remote_ (as given by branch.<name>.remote).
>>      The upstream ref may be different from the local branch ref.
>>
>> optionally s/different from/ same as/ ?
> That "optionally" part is exactly why I said "upstream and remote
> tracking names may or may not differ is irrelevant information".
I think we misunderstand each other again. That very potential 
difference, no matter which way described, was the point at hand - that 
is we are talking about refs at different places.

If we have (quite typically) that merge config indicating that we wish 
to merge refs/heads/master with refs/heads/master then it looks like a 
no-op. They are both the same ref (by name / character sequence). 
Without the extra knowledge that one is local and the other is remote 
then the mental model confusion in the reader continues. The 
'optionally' offer was about choosing the best way of coercing the 
reader into considering the alternate viewpoint. Sometime things  need 
to explained both ways, so that at least one will register.

It could be argued that the merge ref should have been 
`refs/remotes/origin/master` (for that typical following case), but it 
isn't (IIUC because of historic backward compatibility), which would 
have at least avoided the local  v remote conundrum.

All that said, I ended up going with your suggested text anyway ;-)
>>>       The name of the branch at the remote `branch.<name>.remote` that
>>>       is used as the upstream branch for the given branch.  It tells
>>>       `git fetch`, etc., which branch to merge and ...
>>>
>> If this, should we also say it (the key value) is that of the upstream
>> branch _ref_?
> Yeah, that makes it clear that readers should not write "master" and
> use "refs/heads/master" instead.  It may even be more (technically)
> correct to say just "ref" without branch (this ref does not have to
> be a branch at the remote repository at all).  I am not sure if we
> want to go that far to make it more correct and also make it hint
> that using a non-branch ref is a valid configuration to readers, but
> I agree it is a good idea to avoid saying "name" (which implies
> that "master" is OK, which is not).
I'd agree. I'll think about the simplified ref comment.

P.



      reply	other threads:[~2019-10-19 15:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-16 11:28 [PATCH v1] config/branch: state that <name>.merge is the remote ref Philip Oakley
2019-10-18  1:32 ` Junio C Hamano
2019-10-18 20:53   ` Philip Oakley
2019-10-18 20:59     ` [PATCH v2] " Philip Oakley
2019-10-18 23:11     ` [PATCH v1] " Junio C Hamano
2019-10-19 15:19       ` Philip Oakley [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1060efbc-8776-b14c-a1a6-36c03c917059@iee.email \
    --to=philipoakley@iee.email \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).