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

Re: Multi-head pulling series

From
JWJosef Weidendorfer <josef.weidendorfer@gmx.de>
Date
Aug 18, 2005, 10:45 UTC
Message-ID
<200508181245.58250.Josef.Weidendorfer@gmx.de>
In-Reply-To
<7vek8rlnbn.fsf@assigned-by-dhcp.cox.net>
On Thursday 18 August 2005 09:24, Junio C Hamano wrote:
> 	$ cat $GIT_DIR/remotes/www
> 	URL: http://www.kernel.org/pub/scm/git/git.git/
> 	Pull: master:ko-master pu:ko-pu
>       Push: master:master pu:pu foo:bar
Isn't this mixing two kinds of information:
1) Some default/persistent mapping of local to remote heads
2) The default heads which are pulled/pushed when only giving the remote, like 
in:
> 	$ git push mko ;# push our master and pu to the same
> 			# name, foo to .git/refs/heads/bar.

I think it makes sense to be able to store mappings without adding the head to the default group of heads pulled.

Can we put the default pull/push actions in separate lines, like
 	$ cat $GIT_DIR/remotes/mko
 	URL: master.kernel.org:/pub/scm/git/git.git/
 	Pull: master:ko-master pu:ko-pu mylocal:myremote
	Push: master:master pu:pu foo:bar
	Default-Pull: master pu
	Default-Push: master pu foo
	
> 	$ git push mko pu:refs/heads/testing
> 			# instead of pushing to the usual ref,
>                         # push our pu to refs/heads/testing,
>                         # this time only.

With a command (push/fetch/pull) giving an explicit local/remote mapping, it would be cool to automatically add the given mapping to the remotes/ file if there is no push-mapping for pu yet, so that you can have the same later with only

	git push mko pu
And finally, it would be nice to specify a default mapping for arbitrary heads
	$ cat $GIT_DIR/remotes/www
 	URL: http://www.kernel.org/pub/scm/git/git.git/
 	Pull: www#*:*
Such that
	git fetch www#pu
will fetch head pu into local head .refs/heads/www#pu
Josef
PS: I know I should provide patches for my proposals. But let discuss them 
first.
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 9 in “Multi-head pulling series”
  1. Junio C HamanoAug 18, 2005
  2. 1/3 Start adding the $GIT_DIR/remotes/ support.Junio C Hamano, Aug 18, 2005
  3. 2/3 Multi-head fetch.Junio C Hamano, Aug 18, 2005
  4. 3/3 Update git-pull to match updated git-fetch.Junio C Hamano, Aug 18, 2005
  5. Josef WeidendorferAug 18, 2005
  6. Junio C HamanoAug 20, 2005
  7. Josef WeidendorferAug 22, 2005
  8. Junio C HamanoAug 23, 2005
  9. Junio C HamanoAug 23, 2005

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.