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

Re: [PATCH] push: add config option to --force-with-lease by default.

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 5, 2017, 15:17 UTC
Message-ID
<xmqqa84ikj61.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAPB=P5z7MA+TuVaFLUQQdOoJXUb74YxEPS6k4O+NorneVpLitg@mail.gmail.com>
Francesco Mazzoli <f@mazzo.li> writes:
Show 8 quoted lines
> So we would have something like
>
> * `push.disableForce`: config flag that disables `--force` and suggests
>     `--force-with-lease` instead;
> * `--disable-force` and `--no-disable-force`, config flags to tune the above
>     config parameter at will.
>
> What do you think?

The take-away lesson that the earlier thread gave me was that the order in which the three options are ranked by their desirebility in the UI (and the order we would like to encourage users to use) is, from the most to the least preferrable:

 - "--force-with-lease=<ref>:<expect>" that is safer than "--force";
 - "--force" that is known to be dangerous, and does not pretend to
   be anything but;
 - "--force-with-lease" that pretends to be safer but is not.

The last form should eventually be eliminated, as there is no way to correctly intuit what the expected object should be.

To me, a disableForce configuration that encourages use of either the best one or the worst one alone does not look like a step forward, unless we also have a change to disable the last form.

Previous: Francesco MazzoliNext: Francesco Mazzoli
Message 11 of 17 in “push: add config option to --force-with-lease by default.”
  1. push: add config option to --force-with-lease by default.Francesco Mazzoli, Jul 3, 2017
  2. Ævar Arnfjörð BjarmasonJul 3, 2017
  3. Francesco MazzoliJul 3, 2017
  4. push: add config option to --force-with-lease by default.Francesco Mazzoli, Jul 3, 2017
  5. Ævar Arnfjörð BjarmasonJul 3, 2017
  6. Ævar Arnfjörð BjarmasonJul 3, 2017
  7. Junio C HamanoJul 4, 2017
  8. Francesco MazzoliJul 5, 2017
  9. Junio C HamanoJul 5, 2017
  10. Francesco MazzoliJul 5, 2017
  11. Junio C HamanoJul 5, 2017
  12. Francesco MazzoliJul 5, 2017
  13. Mike RappazzoJul 5, 2017
  14. Junio C HamanoJul 6, 2017
  15. Francesco MazzoliJul 7, 2017
  16. Ævar Arnfjörð BjarmasonJul 5, 2017
  17. Ævar Arnfjörð BjarmasonJul 5, 2017

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.