Thread (1 message) 1 message, 1 author, 2021-10-20

Re: [PATCH v3 2/4] remote: use remote_state parameter internally

From: Junio C Hamano <hidden>
Date: 2021-10-20 22:08:12

Junio C Hamano [off-list ref] writes:
In any case, any public facing entry point, like pushremote_get()
that is directly called from cmd_push() with just a name, should
auto vivify an instance of struct remote_state and populate its
members as needed, I think, and in this particular case, I suspect
that it forgets to initialize the current_branch and other members
by calling read_config(), just like other entry points like
repo_remote_get() do.
I give up (for the day at least).  I am not quite sure where things
are going wrong.

There are a few bare repositories (that hold preformatted
documentation trees) next to my primary working tree, and I do

	for topic in htmldocs manpages
	do
		printf "%s: " "$topic"
		( cd ../git-$topic.git && git push "$@") || exit
	done

where "$@" is often nothing, and the backtrace I showed was from
such a push that uses "no remote specified?  push to the origin".
The configuration in these bare repositories do not have anything
particularly interesting.  It has three URLs, and pushes the same to
all three.

[core]
	repositoryformatversion = 0
	filemode = true
	bare = true

[remote "origin"]
        url = gitolite.kernel.org:/pub/scm/git/git-htmldocs.git
        url = github.com:gitster/git-htmldocs.git
	url = repo.or.cz:/srv/git/git-htmldocs.git
        push = refs/heads/master:refs/heads/master
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help