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

Re: [RFC PATCH] git push: Push nothing if no refspecs are given or configured

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 5, 2009, 22:43 UTC
Message-ID
<7vmybzy4ii.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20090305221529.GA25871@pvv.org>

If you want to pursue this, you at least need three patches, preferably four:

 (1) Add a configuration option the existing users can use to ask for
     "with nothing else, please continue to default to matching refs".
     Add a logic to tell "nothing is configured, hence we default to
     matching refs" and "the user explicitly told us either via the
     command line, or in the configuration file to use matching refs"
     cases.  Use the logic to issue a *warning* upon the former case that
     tells the users the following, very loudly:
     - "default to push matching" may be changed in a future version of
       git to "default to push nothing";
     - The user can squelch the warning by various ways:
       - If you want to keep the "matching refs" behaviour, do $this...
       - If you want to have $this behaviour, do $that...
       - ...
     Keep the default for the unconfigured case, after issuing the
     warning, to the matching refs.
 (2) Add a deprecation notice to Documentation/RelNotes-1.6.3.txt similar
     to the way denyCurrentBranch was announced in 1.6.2 release notes (I
     need to carry that part forward to the draft release notes to 1.6.3).
     Mention that these two patches are proposed to be applied immediately.
 (3) Flip the default for unconfigured case to "nothing".  Update the
     warning message you wrote in (1) to explain that:
     - The default used to be "matching refs", but it now is "nothing".
       This message is given loudly because a silent change of default 
       is dangerous to users.
     - The user can squelch the warning by doing ... (I expect the
       instructions will stay the same as in (1)).
     Mention that this patch is proposed to be applied in the next major
     update (perhaps 1.7.0).
 (4) Remove the warning but keep the default to "nothing".  Mention that
     this is to be applied long after (3).

I won't comment on code quality other than hinting that you do not want to reinvent has_multiple_bits().

Previous: Jakub NarebskiNext: Johannes Schindelin
Message 18 of 23 in “git push: Push nothing if no refspecs are given or configured”
  1. git push: Push nothing if no refspecs are given or configuredFinn Arne Gangstad, Mar 5, 2009
  2. Sverre RabbelierMar 5, 2009
  3. Markus HeidelbergMar 5, 2009
  4. Markus HeidelbergMar 5, 2009
  5. Sverre RabbelierMar 5, 2009
  6. Johannes SchindelinMar 6, 2009
  7. Junio C HamanoMar 6, 2009
  8. Sverre RabbelierMar 6, 2009
  9. Finn Arne GangstadMar 6, 2009
  10. Johannes SchindelinMar 6, 2009
  11. Finn Arne GangstadMar 6, 2009
  12. Jakub NarebskiMar 6, 2009
  13. Junio C HamanoMar 6, 2009
  14. Johannes SchindelinMar 7, 2009
  15. Johannes SchindelinMar 6, 2009
  16. John TapsellMar 6, 2009
  17. Jakub NarebskiMar 6, 2009
  18. Junio C HamanoMar 5, 2009
  19. Johannes SchindelinMar 6, 2009
  20. Markus HeidelbergMar 9, 2009
  21. Johannes SchindelinMar 9, 2009
  22. Markus HeidelbergMar 9, 2009
  23. Jeff KingMar 9, 2009

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.