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

Re: [PATCH v2] New config push.default to decide default behavior for push

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 16, 2009, 21:13 UTC
Message-ID
<7vljr5uq72.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20090316155629.GA17526@pvv.org>
Finn Arne Gangstad <finnag@pvv.org> writes:
Show 18 quoted lines
> On Sun, Mar 15, 2009 at 09:55:23PM -0700, Junio C Hamano wrote:
>> Junio C Hamano <gitster@pobox.com> writes:
>> 
>> As some people still seem to object to the change of default (and that
>> includes 20-30% of myself), we may end up deciding not to switch the
>> default after all, but even in that case, applying the first half would
>> benefit people who would want different behaviour.
>
> I think the suggested new default is a lot safer then the current
> one. A default of "nothing" will print a nice message if you end up
> pushing nothing, which you will fix in a heartbeat with a single git
> config command.
>
> If you erroneously push one or more branches however, cleanup might
> end up being very complicated. Many pushable repos are set up with
> disallowing non-fast-forward pushes, so it may require intervention by
> someone else to clean up, and by then someone else have already
> fetched the bad push.

I think traditionalists who do not like changing the default already know these, though. I would not object to the push.default as a _choice_.

In fact, sourceforge.jp (they added git support late last year, and I keep a secondary public repository just like my alt-git.git at repo.or.cz) is one of such places. It seems to forbid non fast-forward pushes, and that is why I have been pushing only maint and master there. It does allow deletion, and I could push deletion followed by creation in two stages, i.e. "git push sfjp :pu && git push sfjp pu", but I did not bother.

In a later part of the message you are responding to (but did not quote), I was agreeing with all of what you wrote here, and even more ;-) Notice the "tradeoff does not look too bad to me" part.

Your new [1/2] gives the choice without advertisement, and _if_ you remove or tone down "The default may change in the future" from [2/2], it becomes purely an advertisement of the feature to help people from burning themselves. I do not see anything a sane traditionist would object to at that point, and I thought we could even squash the two into one commit (which was what I meant by "I am inclined to change my mind" in the message you are responding to).

Previous: Finn Arne Gangstad
Message 7 of 7 in “New config push.default to decide default behavior for push”
  1. New config push.default to decide default behavior for pushFinn Arne Gangstad, Mar 11, 2009
  2. Junio C HamanoMar 12, 2009
  3. Finn Arne GangstadMar 12, 2009
  4. Junio C HamanoMar 14, 2009
  5. Junio C HamanoMar 16, 2009
  6. Finn Arne GangstadMar 16, 2009
  7. Junio C HamanoMar 16, 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.