Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Junio C Hamano
Josh Triplett j...@joshtriplett.org writes: On Wed, Mar 27, 2013 at 05:48:45PM -0500, Rob Hoelz wrote: ... The test that checked that pushInsteadOf + pushurl shouldn't work as I expect was actually broken; I have removed it, updated the documentation, and sent a new patch to the list.

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Josh Triplett
On Thu, Mar 28, 2013 at 08:37:58AM -0700, Junio C Hamano wrote: Josh Triplett j...@joshtriplett.org writes: On Wed, Mar 27, 2013 at 05:48:45PM -0500, Rob Hoelz wrote: ... The test that checked that pushInsteadOf + pushurl shouldn't work as I expect was actually broken; I have removed

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Junio C Hamano
Josh Triplett j...@joshtriplett.org writes: OK, I take it back. I *can* imagine configurations that this change would break, since it does change intentional and documented behavior, but I don't have any such configuration. The only such configuration I can imagine involves directly

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Josh Triplett
On Thu, Mar 28, 2013 at 09:10:59AM -0700, Junio C Hamano wrote: Josh Triplett j...@joshtriplett.org writes: OK, I take it back. I *can* imagine configurations that this change would break, since it does change intentional and documented behavior, but I don't have any such configuration.

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Junio C Hamano
Josh Triplett j...@joshtriplett.org writes: (on url.$base.pushInsteadOf) If a remote has an explicit pushurl, git will ignore this setting for that remote. That really meant what I just said above: git will prefer an explicit pushurl over the pushInsteadOf rewrite of url. Very correct. It

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Josh Triplett
On Thu, Mar 28, 2013 at 11:50:08AM -0700, Junio C Hamano wrote: Josh Triplett j...@joshtriplett.org writes: (on url.$base.pushInsteadOf) If a remote has an explicit pushurl, git will ignore this setting for that remote. That really meant what I just said above: git will prefer an explicit

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Jonathan Nieder
Josh Triplett wrote: Related to this, as a path forward, I do think it makes sense to have a setting usable as an insteadOf that only applies to pushurl, even though pushInsteadOf won't end up serving that purpose. That way, pushInsteadOf covers the map read-only repo url to pushable repo

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Rob Hoelz
On Thu, 28 Mar 2013 12:25:07 -0700 Jonathan Nieder jrnie...@gmail.com wrote: Josh Triplett wrote: Related to this, as a path forward, I do think it makes sense to have a setting usable as an insteadOf that only applies to pushurl, even though pushInsteadOf won't end up serving that

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-28 Thread Junio C Hamano
Rob Hoelz r...@hoelz.ro writes: Honestly, if my workflow here is stupid and not Git-like and someone has a better suggestion, I would happy to let my patch go. Using two remotes is an option, but to me, using this triangular setup is just easier. I think you are conflating two unrelated

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-27 Thread Rob Hoelz
On Wed, 20 Mar 2013 07:35:58 -0700 Junio C Hamano gits...@pobox.com wrote: Rob Hoelz r...@hoelz.ro writes: On 3/19/13 7:08 PM, Junio C Hamano wrote: Jonathan Nieder jrnie...@gmail.com writes: Junio C Hamano wrote: Jonathan Nieder jrnie...@gmail.com writes: Test nits: ... Hope

[PATCH] push: Alias pushurl from push rewrites

2013-03-27 Thread Rob Hoelz
git push currently doesn't consider pushInsteadOf when using pushurl; this test tests that. If you use pushurl with an alias that has a pushInsteadOf configuration value, Git does not take advantage of it. For example: [url git://github.com/] insteadOf = github: [url

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-27 Thread Jonathan Nieder
Rob Hoelz wrote: --- a/remote.c +++ b/remote.c @@ -465,7 +465,11 @@ static void alias_all_urls(void) if (!remotes[i]) continue; for (j = 0; j remotes[i]-pushurl_nr; j++) { - remotes[i]-pushurl[j] =

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-27 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: Sorry, typo. The configuration in the example above should have been [url git://anongit.myserver.example.com/] insteadOf = myserver.example.com: [url myserver.example.com:] pushInsteadOf =

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-27 Thread Rob Hoelz
On Wed, 27 Mar 2013 15:07:18 -0700 Junio C Hamano gits...@pobox.com wrote: Jonathan Nieder jrnie...@gmail.com writes: Sorry, typo. The configuration in the example above should have been [url git://anongit.myserver.example.com/] insteadOf = myserver.example.com:

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-27 Thread Rob Hoelz
On Wed, 27 Mar 2013 15:47:35 -0700 Jonathan Nieder jrnie...@gmail.com wrote: Hi, Rob Hoelz wrote: On Wed, 27 Mar 2013 11:23:45 -0700 Jonathan Nieder jrnie...@gmail.com wrote: Suppose I configure [url git://anongit.myserver.example.com/] insteadOf =

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-27 Thread Jonathan Nieder
Rob Hoelz wrote: My mistake; I had not seen it! I thought you may have found a bug in my implementation, so I wanted to double check. =) Well, I had found an unfortunate consequence of the implementation that uses an unnecessary copy. :) Will follow up to the updated patch. -- To unsubscribe

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-27 Thread Rob Hoelz
On Wed, 27 Mar 2013 15:56:56 -0700 Jonathan Nieder jrnie...@gmail.com wrote: Rob Hoelz wrote: My mistake; I had not seen it! I thought you may have found a bug in my implementation, so I wanted to double check. =) Well, I had found an unfortunate consequence of the implementation that

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-27 Thread Josh Triplett
On Wed, Mar 27, 2013 at 05:48:45PM -0500, Rob Hoelz wrote: On Wed, 27 Mar 2013 15:07:18 -0700 Junio C Hamano gits...@pobox.com wrote: Jonathan Nieder jrnie...@gmail.com writes: Sorry, typo. The configuration in the example above should have been [url

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-27 Thread Josh Triplett
On Wed, Mar 27, 2013 at 04:09:43PM -0700, Josh Triplett wrote: On Wed, Mar 27, 2013 at 05:48:45PM -0500, Rob Hoelz wrote: On Wed, 27 Mar 2013 15:07:18 -0700 Junio C Hamano gits...@pobox.com wrote: Jonathan Nieder jrnie...@gmail.com writes: Sorry, typo. The configuration in the

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-27 Thread Jonathan Nieder
Josh Triplett wrote: I have a .gitconfig in my git-managed home directory which sets pushInsteadOf so that I can clone via git:// and immediately have working push. I work with a number of systems that don't have inbound access to each other but do have outbound access

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-20 Thread Rob Hoelz
On 3/19/13 7:08 PM, Junio C Hamano wrote: Jonathan Nieder jrnie...@gmail.com writes: Junio C Hamano wrote: Jonathan Nieder jrnie...@gmail.com writes: Test nits: ... Hope that helps, Jonathan Nieder (3): push test: use test_config where appropriate push test: simplify check of push

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-19 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: Junio C Hamano wrote: Jonathan Nieder jrnie...@gmail.com writes: Test nits: ... Hope that helps, Jonathan Nieder (3): push test: use test_config where appropriate push test: simplify check of push result push test: rely on -chaining

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-18 Thread Rob Hoelz
On 3/18/13 12:35 AM, Junio C Hamano wrote: Rob Hoelz r...@hoelz.ro writes: git push currently doesn't consider pushInsteadOf when using pushurl; this tests and fixes that. If you use pushurl with an alias that has a pushInsteadOf configuration value, Git does not take advantage of it. For

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-18 Thread Rob Hoelz
On Sun, 17 Mar 2013 16:35:59 -0700 Junio C Hamano gits...@pobox.com wrote: Rob Hoelz r...@hoelz.ro writes: git push currently doesn't consider pushInsteadOf when using pushurl; this tests and fixes that. If you use pushurl with an alias that has a pushInsteadOf configuration value,

[PATCH] push: Alias pushurl from push rewrites

2013-03-18 Thread Rob Hoelz
git push currently doesn't consider pushInsteadOf when using pushurl; this test tests that. If you use pushurl with an alias that has a pushInsteadOf configuration value, Git does not take advantage of it. For example: [url git://github.com/] insteadOf = github: [url

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-18 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: Test nits: ... Hope that helps, Jonathan Nieder (3): push test: use test_config where appropriate push test: simplify check of push result push test: rely on -chaining instead of 'if bad; then echo Oops; fi' Are these supposed to be

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-18 Thread Jonathan Nieder
Junio C Hamano wrote: Jonathan Nieder jrnie...@gmail.com writes: Test nits: ... Hope that helps, Jonathan Nieder (3): push test: use test_config where appropriate push test: simplify check of push result push test: rely on -chaining instead of 'if bad; then echo Oops; fi' Are

[PATCH] push: Alias pushurl from push rewrites

2013-03-17 Thread Rob Hoelz
git push currently doesn't consider pushInsteadOf when using pushurl; this tests and fixes that. If you use pushurl with an alias that has a pushInsteadOf configuration value, Git does not take advantage of it. For example: [url git://github.com/] insteadOf = github: [url

Re: [PATCH] push: Alias pushurl from push rewrites

2013-03-17 Thread Junio C Hamano
Rob Hoelz r...@hoelz.ro writes: git push currently doesn't consider pushInsteadOf when using pushurl; this tests and fixes that. If you use pushurl with an alias that has a pushInsteadOf configuration value, Git does not take advantage of it. For example: [url git://github.com/]