Thread (5 messages) flat view 5 messages, 2 authors, 2016-06-15

Re: Multi-head pulling series

From: Josef Weidendorfer <hidden>
Date: 2016-06-15 22:42:04

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help