Re: What's cooking in git.git (Apr 2020, #01; Wed, 15)
- From
- Damien Robert <damien.olivier.robert@gmail.com>
- Date
- Apr 17, 2020, 22:04 UTC
- Message-ID
- <20200417220445.sasjy4rvzonoz7cn@doriath>
- 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) :
Show 10 quoted lines
> ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- > [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