git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Bagas Sanjaya <bagasdotme@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Incorrect branch information after fetching (local branch != remote branch)
Date: Mon, 02 May 2022 23:49:25 -0700	[thread overview]
Message-ID: <xmqq35hrrtze.fsf@gitster.g> (raw)
In-Reply-To: <bcb069c7-f104-a494-1862-30709dc6f8a0@gmail.com> (Bagas Sanjaya's message of "Tue, 3 May 2022 13:42:06 +0700")

Bagas Sanjaya <bagasdotme@gmail.com> writes:

> On 5/3/22 12:51, Junio C Hamano wrote:
>> The verbose report left by "git fetch" tells us what branch they
>> have is used to update what branch we have, so I think this is
>> pretty much expected.
>> 
>> I am puzzled by your mention of 'net-next' (local).
>> 
>> You may have
>> 
>>     [branch "net-next"]
>>         remote = net-next
>> 	merge = master
>> 
>> and that is where your expectation on the local may be coming from,
>> but it wouldn't be all that relevant to "git fetch". The update of
>> the local branch will happen long after "git fetch" is done.
>> 
>
> Ah I see.
>
> So the left-hand side of verbose report (local branch) is actually
> the value of branch."net-next".merge, right?

Not really.  It comes from

	[remote "net-next"]
	    remote = https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next
	    fetch = refs/heads/*:refs/remotes/net-next/*

and the fact that the remote happens to have only one branch under
its refs/heads/ hierarchy.  Fetch does not care all that much about
"branch.*.merge" (which is what I said---the configuration is not
all that relevant to "git fetch").


      reply	other threads:[~2022-05-03  6:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03  4:58 Incorrect branch information after fetching (local branch != remote branch) Bagas Sanjaya
2022-05-03  5:51 ` Junio C Hamano
2022-05-03  6:42   ` Bagas Sanjaya
2022-05-03  6:49     ` Junio C Hamano [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

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

  git send-email \
    --in-reply-to=xmqq35hrrtze.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=bagasdotme@gmail.com \
    --cc=git@vger.kernel.org \
    /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 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 NNTP newsgroup(s).