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
Francesco Mazzoli <f@mazzo.li>
Date
Jul 5, 2017, 16:43 UTC
Message-ID
<EA42AB04-D538-4B4A-BC19-CAE9A80EEA76@mazzo.li>
In-Reply-To
<xmqqa84ikj61.fsf@gitster.mtv.corp.google.com>
Show 16 quoted lines
> On 5 Jul 2017, at 17:17, Junio C Hamano <gitster@pobox.com> wrote:
> 
> 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.

What's not clear to me is what the intended workflow using `--force-with-lease=<ref>:<expect>` is. Intuitively it seems extremely cumbersome to manually pluck a revision each time, especially when dealing with commits that all have the same description.

On the other hand for my workflow `--force-with-lease` works quite well because I tend to use it in cases where me and a colleague are working on the same PR, and thus I'm not doing anything else (including fetching).

Moreover, it seems to me that the problem `--force-with-lease` is just one of marketing. `--force-with-lease` is strictly more "safe" than `--force` in the sense that it'll reject some pushes that `--force` will let through. I think that if we advertise it better including its drawbacks it can still be better than no checks at all.

Francesco
Previous: Junio C HamanoNext: Mike Rappazzo
Message 12 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.