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 7, 2017, 06:19 UTC
Message-ID
<CAPB=P5xNDdexiyT_mVvcVmmuzS5RUqnhyC3VofPcs5-k5H8BBQ@mail.gmail.com>
In-Reply-To
<xmqqy3s1e5uw.fsf@gitster.mtv.corp.google.com>
On 6 July 2017 at 21:13, Junio C Hamano <gitster@pobox.com> wrote:
> By that logic, a hypothetical update to `--force` that makes 1/3 of
> the attempted forced push randomly would make it safer than the
> current `--force`, wouldn't it?

It would. However, this additional safety is not really meaningful to any workflow, while the one added by `--force-with-lease` is.

Show 14 quoted lines
> When third-party tools fetch and update remote-tracking branches
> behind the users' back, the safety based on the stability of
> remote-tracking branches are defeated.  And the biggest problem
> is that the way `--force-with-lease` misbehaves---it is not like
> it randomly and mistakenly stops the push that could go through;
> it lets through what shouldn't.
>
> See the other patch I sent just now---with something like that patch
> that lets those like you, who know their remote-tracking branches
> are reliable, use the lazy form, while disabling it by default for
> others (until they examine their situation and perhaps disable the
> problematic auto-fetching) in place, I do not think it is a bad idea
> to advertise --force-with-lease a safer option than --force (because
> those for whom it is not safer will not be able to use it).

Fair enough, I'm OK with enabling it with some config. I'd still like a way to enable it by default if I want though.

Thanks, Francesco

Previous: Junio C HamanoNext: Ævar Arnfjörð Bjarmason
Message 15 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.