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

Re: [PATCH 6/6] push: honor branch.*.push

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Jun 24, 2013, 16:09 UTC
Message-ID
<CALkWK0=a40hACGYApN7odrTytDmoRG_00_Q=EuaHuQ_=h8LBkg@mail.gmail.com>
In-Reply-To
<7vy59zbjns.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
Show 5 quoted lines
> If the user said "git push" without an explicit request to push to
> "ram", and if branch.master.pushremote was not set to "ram", and
> still the command "git push" pushed the branch to "ram", then I
> would understand what you are worried about, but otherwise I do not
> see how what you are saying makes sense.
We currently have no system to differentiate between those two cases.
> A safety valve is different from a straight-jacket.  If you are
> working largely with a central repository and have push.default set
> to upstream, are you now disallowed to push out things to other
> places to ask help from your colleague to check your wip?  Why?

I've been harping about how this safety valve is poorly done, and I'm the first person interested in loosening it. But I do not think this is the way to do it: drop in branch.<name>.push magic, and make upstream suddenly work with triangular workflows?

Show 5 quoted lines
> Or are you saying that with push.default set to upstream, only these
> two forms should be allowed?
>
>     $ git push ;# no destination, no refspec
>     $ git push there ref:spec ;# both explicitly specified
No, no.  What I meant is:
  From the documentation of push.default, I _expect_ upstream to kick
  in only in the first case.  In the second case, I _know_ that my
  push.default is inconsequential.

With branch.<name>.push magic, you've sneaked in a push refspec under the carpet, and the first form suddenly doesn't care about push.default anymore. remote.<name>.push is also an under-the-carpet implementation that I don't like: it's done in push_with_options() which can completely bypass setup_default_push_refspecs(), shooting the user in the face.

I want properly defined precedence and well-defined overall behavior. Not sneaky stuff. I don't have an answer, but will start a discussion with some code soon. In the meantime, since we've already figured out this series, merge it without 6/6.

Thanks.
Previous: Junio C HamanoNext: Junio C Hamano
Message 29 of 36 in “Reroll of rr/triangular-push-fix”
  1. 0/6 Reroll of rr/triangular-push-fixJunio C Hamano, Jun 24, 2013
  2. 1/6 t/t5528-push-default: remove redundant test_config linesJunio C Hamano, Jun 24, 2013
  3. 2/6 config doc: rewrite push.default sectionJunio C Hamano, Jun 24, 2013
  4. 3/6 push: change `simple` to accommodate triangular workflowsJunio C Hamano, Jun 24, 2013
  5. Johan HerlandJun 24, 2013
  6. Junio C HamanoJun 24, 2013
  7. Ramkumar RamachandraJun 24, 2013
  8. Johan HerlandJun 24, 2013
  9. Ramkumar RamachandraJun 24, 2013
  10. Junio C HamanoJun 24, 2013
  11. Johan HerlandJun 24, 2013
  12. 4/6 t/t5528-push-default: generalize test_push_*Junio C Hamano, Jun 24, 2013
  13. Johan HerlandJun 24, 2013
  14. Junio C HamanoJun 24, 2013
  15. Johan HerlandJun 24, 2013
  16. Eric SunshineJun 24, 2013
  17. Johan HerlandJun 24, 2013
  18. Junio C HamanoJun 24, 2013
  19. 5/6 t/t5528-push-default: test pushdefault workflowsJunio C Hamano, Jun 24, 2013
  20. 6/6 push: honor branch.*.pushJunio C Hamano, Jun 24, 2013
  21. Johan HerlandJun 24, 2013
  22. Junio C HamanoJun 24, 2013
  23. Ramkumar RamachandraJun 24, 2013
  24. Junio C HamanoJun 24, 2013
  25. Ramkumar RamachandraJun 24, 2013
  26. Johan HerlandJun 24, 2013
  27. Junio C HamanoJun 24, 2013
  28. Junio C HamanoJun 24, 2013
  29. Ramkumar RamachandraJun 24, 2013
  30. Junio C HamanoJun 24, 2013
  31. Ramkumar RamachandraJun 24, 2013
  32. Junio C HamanoJun 24, 2013
  33. Ramkumar RamachandraJun 24, 2013
  34. Ramkumar RamachandraJun 24, 2013
  35. Junio C HamanoJun 24, 2013
  36. Ramkumar RamachandraJun 24, 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.