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

Re: Would a config var for --force-with-lease be useful?

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 27, 2018, 20:09 UTC
Message-ID
<xmqqlg8rinbz.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<87o9dnegxi.fsf@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 6 quoted lines
> This was after/during a long discussion starting with:
> https://public-inbox.org/git/CACBZZX7MeX-6RHgh2Fa9+YL03mjxs8xmyE86HnVxBxjMYizcig@mail.gmail.com/
>
> It appears the only patch that got in from that discussion was my
> f17d642d3b ("push: document & test --force-with-lease with multiple
> remotes", 2017-04-19) (https://github.com/git/git/commit/f17d642d3b)
Thanks for pointing at the old thread.

As far as our documentation is concerned, the invitation to improve the situation, offered in "git push --help", is still valid:

    Note that all forms other than `--force-with-lease=<refname>:<expect>`
    that specifies the expected current value of the ref explicitly are
    still experimental and their semantics may change as we gain experience
    with this feature.

But I do not think (and I did not think back then) there is a magic bullet to make the lazy force-with-lease automatically safe for everybody, so it may be time to declare that the lazy force-with-lease was a failed experiment and move on, with a patch like the one suggested last year in the message:

  https://public-inbox.org/git/xmqq37a9fl8a.fsf_-_@gitster.mtv.corp.google.com/
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 7 of 9 in “Would a config var for --force-with-lease be useful?”
  1. Scott JohnsonAug 24, 2018
  2. Constantin WeißerAug 25, 2018
  3. Johannes SchindelinAug 27, 2018
  4. Phillip WoodAug 28, 2018
  5. Junio C HamanoAug 27, 2018
  6. Ævar Arnfjörð BjarmasonAug 27, 2018
  7. Junio C HamanoAug 27, 2018
  8. Ævar Arnfjörð BjarmasonAug 27, 2018
  9. Junio C HamanoAug 27, 2018

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.