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

Re: What's cooking in git.git (Apr 2020, #01; Wed, 15)

From
DRDamien 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
Previous: Junio C HamanoNext: Junio C Hamano
Message 12 of 18 in “What's cooking in git.git (Apr 2020, #01; Wed, 15)”
  1. Junio C HamanoApr 15, 2020
  2. Elijah NewrenApr 16, 2020
  3. Junio C HamanoApr 16, 2020
  4. Damien RobertApr 16, 2020
  5. Jeff KingApr 16, 2020
  6. Junio C HamanoApr 16, 2020
  7. Damien RobertApr 16, 2020
  8. Damien RobertApr 16, 2020
  9. Junio C HamanoApr 16, 2020
  10. Damien RobertApr 17, 2020
  11. Junio C HamanoApr 17, 2020
  12. Damien RobertApr 17, 2020
  13. Junio C HamanoApr 17, 2020
  14. Damien RobertApr 18, 2020
  15. Danh DoanApr 17, 2020
  16. Junio C HamanoApr 17, 2020
  17. Danh DoanApr 17, 2020
  18. Junio C HamanoApr 17, 2020

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.