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

2013-03-28 Thread Junio C Hamano
Rob Hoelz 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 things. Pu

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 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 purpose. That >

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 rep

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 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

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

2013-03-28 Thread Junio C Hamano
Josh Triplett 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 says nothing ab

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 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

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

2013-03-28 Thread Junio C Hamano
Josh Triplett 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 counting on the non-rewri

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 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

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

2013-03-28 Thread Josh Triplett
On Wed, Mar 27, 2013 at 04:18:19PM -0700, Jonathan Nieder wrote: > 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 syste

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

2013-03-28 Thread Junio C Hamano
Jonathan Nieder writes: > 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 eac

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

2013-03-28 Thread Junio C Hamano
Josh Triplett 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. > > There's an argum

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

2013-03-27 Thread Jonathan Nieder
Hi, Rob Hoelz wrote: > git push currently doesn't consider pushInsteadOf when > using pushurl; this test tests that. I'd leave out this paragraph, since it is redundant next to the rest of the commit message (except that you have added tests, which ideally every bugfix patch would do :)). [...]

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 acce

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 wrote: > > > > > Jonathan Nieder writes: > > > > > > > Sorry, typo. The configuration in the example above shoul

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 wrote: > > > Jonathan Nieder writes: > > > > > Sorry, typo. The configuration in the example above should have > > > been > > > > > > [url "git://anongit.myserver.example.com/"] >

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

2013-03-27 Thread Junio C Hamano
>> Subject: Re: [PATCH] push: Alias pushurl from push rewrites Please increment [PATCH v$n] for a new round, so that we can tell which one is the latest. Rob Hoelz writes: > git push currently doesn't consider pushInsteadOf when > using pushurl; this test tests that. This p

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 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 uses an u

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 unsubscrib

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 wrote: > Hi, > > Rob Hoelz wrote: > > On Wed, 27 Mar 2013 11:23:45 -0700 > > Jonathan Nieder wrote: > > >> Suppose I configure > >> > >>[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:07:18 -0700 Junio C Hamano wrote: > Jonathan Nieder writes: > > > Sorry, typo. The configuration in the example above should have > > been > > > > [url "git://anongit.myserver.example.com/"] > > insteadOf = myserver.example.com: > > [url "myserver.exa

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

2013-03-27 Thread Jonathan Nieder
Hi, Rob Hoelz wrote: > On Wed, 27 Mar 2013 11:23:45 -0700 > Jonathan Nieder wrote: >> Suppose I configure >> >> [url "git://anongit.myserver.example.com/"] >> insteadOf = myserver.example.com: >> [url "myserver:"] >> pushInsteadOf = myserver.example.com: >> >>

[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 "git://github.com/myus

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

2013-03-27 Thread Rob Hoelz
On Wed, 27 Mar 2013 11:23:45 -0700 Jonathan Nieder wrote: > 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

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

2013-03-27 Thread Junio C Hamano
Jonathan Nieder 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 = myserver.example.com: > > I

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

2013-03-27 Thread Jonathan Nieder
Jonathan Nieder wrote: > Rob Hoelz wrote: >> --- a/remote.c >> +++ b/remote.c >> @@ -465,7 +465,11 @@ static void alias_all_urls(void) [...] >> -remotes[i]->pushurl[j] = >> alias_url(remotes[i]->pushurl[j], &rewrites); >> +char *copy = xstrdup(remotes[i]->p

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] = > alias_url

[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 "git://github.com/myus

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 wrote: > Rob Hoelz writes: > > > On 3/19/13 7:08 PM, Junio C Hamano wrote: > >> Jonathan Nieder writes: > >> > >>> Junio C Hamano wrote: > Jonathan Nieder writes: > > Test nits: > > ... > > Hope that helps, > > > > Jon

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

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

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 writes: > >> Junio C Hamano wrote: >>> Jonathan Nieder writes: Test nits: ... Hope that helps, Jonathan Nieder (3): push test: use test_config where appropriate push test: simplify check of push res

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

2013-03-19 Thread Junio C Hamano
Jonathan Nieder writes: > Junio C Hamano wrote: >> Jonathan Nieder 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

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

2013-03-18 Thread Jonathan Nieder
Junio C Hamano wrote: > Jonathan Nieder 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 t

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

2013-03-18 Thread Junio C Hamano
Jonathan Nieder 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 follow-up patch

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

2013-03-18 Thread Jonathan Nieder
Hi, Rob Hoelz wrote: > [url "git://github.com/"] > insteadOf = github: > [url "git://github.com/myuser/"] > insteadOf = mygithub: > [url "g...@github.com:myuser/"] > pushInsteadOf = mygithub: > [remote "origin"] > url = github:organization/project > pushurl = mygithub:proj

[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 "git://github.com/myus

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 wrote: > Rob Hoelz 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 ad

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 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 ex

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

2013-03-17 Thread Junio C Hamano
Rob Hoelz 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/"] > insteadO

[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 "git://github.com