git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Damien Robert <damien.olivier.robert@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jeff King <peff@peff.net>, git@vger.kernel.org
Subject: Re: What's cooking in git.git (Apr 2020, #01; Wed, 15)
Date: Sat, 18 Apr 2020 00:04:45 +0200	[thread overview]
Message-ID: <20200417220445.sasjy4rvzonoz7cn@doriath> (raw)
In-Reply-To: <xmqq1romvx2q.fsf@gitster.c.googlers.com>

Just a quick answeŗ, I'll give a more complete one afterwards.

From Junio C Hamano, Fri 17 Apr 2020 at 10:30:53 (-0700) :
> ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- 
> [branch "master"]
> 	pushremote = publish
> 
> [remote "publish"]
> 	url = .
> 
> [remote "origin"]
> 	url = ../somewhere-else
> ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- 

If you remove the remote "origin", then
	struct remote *fetch_remote = remote_get(NULL);
used by pull.c will return NULL:

it fallbacks to 'origin' which does not exist, so remote_get_1 in
	if (!valid_remote(ret))
		return NULL;
returns NULL

But is_workflow_triangular in
	struct remote *fetch_remote = remote_get(remote_for_branch(branch, &explicit);
);
returns "origin"

The difference in remote_get_1 is that
	name_given = 1;
So
	if (name_given && !valid_remote(ret))
		add_url_alias(ret, name);
gets called.

But I think that means that my fixup is actually wrong when a pushRemote is
set without a remote while 'origin' do exist. I'll need to test. Grmpf!

Thanks a lot for the thorough review!

-- 
Damien Robert
http://www.normalesup.org/~robert/pro

  reply	other threads:[~2020-04-17 22:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-15 23:01 What's cooking in git.git (Apr 2020, #01; Wed, 15) Junio C Hamano
2020-04-16 15:28 ` Elijah Newren
2020-04-16 16:37   ` Junio C Hamano
2020-04-16 21:12 ` Damien Robert
2020-04-16 21:30   ` Jeff King
2020-04-16 22:18     ` Junio C Hamano
2020-04-16 22:47       ` Damien Robert
2020-04-16 23:05         ` Damien Robert
2020-04-16 23:34           ` Junio C Hamano
2020-04-17 12:54             ` Damien Robert
2020-04-17 17:30               ` Junio C Hamano
2020-04-17 22:04                 ` Damien Robert [this message]
2020-04-17 23:22                   ` Junio C Hamano
2020-04-18 17:36                     ` Damien Robert
2020-04-17  2:24 ` Danh Doan
2020-04-17  5:38   ` Junio C Hamano
2020-04-17 13:36     ` Danh Doan
2020-04-17 17:40       ` 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=20200417220445.sasjy4rvzonoz7cn@doriath \
    --to=damien.olivier.robert@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /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).