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

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
Previous: Jonathan NiederNext: Junio C Hamano
Message 18 of 24 in “push: Alias pushurl from push rewrites”
  1. push: Alias pushurl from push rewritesRob Hoelz, Mar 27, 2013
  2. Jonathan NiederMar 27, 2013
  3. Jonathan NiederMar 27, 2013
  4. Junio C HamanoMar 27, 2013
  5. Rob HoelzMar 27, 2013
  6. Josh TriplettMar 27, 2013
  7. Josh TriplettMar 27, 2013
  8. Jonathan NiederMar 27, 2013
  9. Junio C HamanoMar 28, 2013
  10. Josh TriplettMar 28, 2013
  11. Junio C HamanoMar 28, 2013
  12. Josh TriplettMar 28, 2013
  13. Junio C HamanoMar 28, 2013
  14. Josh TriplettMar 28, 2013
  15. Junio C HamanoMar 28, 2013
  16. Josh TriplettMar 28, 2013
  17. Jonathan NiederMar 28, 2013
  18. Rob HoelzMar 29, 2013
  19. Junio C HamanoMar 29, 2013
  20. Rob HoelzMar 27, 2013
  21. Jonathan NiederMar 27, 2013
  22. Rob HoelzMar 27, 2013
  23. Jonathan NiederMar 27, 2013
  24. Rob HoelzMar 27, 2013

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.