Re: [PATCH] push: Alias pushurl from push rewrites
- From
Rob Hoelz <rob@hoelz.ro>
- Date
- Mar 29, 2013, 04:53 UTC
- Message-ID
- <20130328235319.299cb494@hoelz.ro>
- In-Reply-To
- <20130328192507.GS28148@google.com>
On Thu, 28 Mar 2013 12:25:07 -0700 Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 24 quoted lines
> 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 url" case, and insteadOfPushOnly covers the "construct a magic > > prefix that maps to different urls when used in url or pushurl" > > case. > > I hope not. That would be making configuration even more complicated. > > I hope that we can fix the documentation, tests, and change > description in the commit message enough to make Rob's patch a > no-brainer. If that's not possible, I think the current state is > livable, just confusing. > > I was happy to see Rob's patch because it brings git's behavior closer > to following the principle of least surprise. I am not actually that > excited by the use case, except the "avoiding surprise" part of it. > > Hope that helps, > Jonathan >
Thanks for all of the input, everyone. I personally agree with Jonathon's notion of "principle of least surprise", as I was quite surprised when my configuration with pushInsteadOf + pushurl did not work. However, I also understand Junio's arguments about going back on documented behavior, as well as whether or not it's a good idea to have this "triangular" remote set up.
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.
The only way I see this breaking an existing configuration is if a user has something like url.user@server.com.pushInsteadOf = myserver:, and pushurl = myserver:repo/. If this behavior weren't documented, I would say that such a configuration works because it relies on a bug, and should use ssh://myserver:repo/ instead. I personally feel that the fact that insteadOf + url works and pushInsteadOf + pushurl doesn't is inconsistent and confusing. However, I am one user of many, and this is my first exposure to Git from a project contributor point of view. Therefore, I submit to the wisdom of more seasoned Git developers such as yourselves. =)
-Rob