git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Francesco Mazzoli <f@mazzo.li>, Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] push: add config option to --force-with-lease by default.
Date: Wed, 05 Jul 2017 13:26:23 +0200	[thread overview]
Message-ID: <87eftvazvk.fsf@gmail.com> (raw)
In-Reply-To: <CAPc5daXn=PJ47JkZQNnReNNSUhQK3eJm0Namd-A+e9TM4Dnr2A@mail.gmail.com>


On Wed, Jul 05 2017, Junio C. Hamano jotted:

> On Tue, Jul 4, 2017 at 11:34 PM, Francesco Mazzoli <f@mazzo.li> wrote:
>>
>> Could you clarify the danger you're referring to? E.g. give an example
>> of surprising --force-with-lease behavior that we do not want to
>> encourage?
>
> https://public-inbox.org/git/1491617750.2149.10.camel@mattmccutchen.net/

In the context of this patch I don't understand why you're concerned
that making --force mean --force-with-lease makes things worse.

See my
https://public-inbox.org/git/CACBZZX48RanjHsv1UsnxkbxRtqKRGgMcgmtVqQmR84H5j8awqQ@mail.gmail.com/
(follow-up to the E-Mail you posted):

    To me the *main* feature of --force-with-lease is that it's less
    shitty than --force, without imposing too much UI overhead. We have to
    be really careful not to make --force-with-lease so complex by default
    that people just give u and go back to using --force, which would be
    worse than either whatever current problems there are with the
    current --force-with-lease behavior, or anything we replace it with.

I.e. yes there are workflows with some background auto-update that will
make it less safe, which I documented in f17d642d3b ("push: document &
test --force-with-lease with multiple remotes", 2017-04-19).

But it is still the case that --force-with-lease is categorically a more
safer option than simply --force, which has none of the safety
--force-with-lease has. It would still wipe away history in this
scenario you're pointing out *and others*.

Surely the point of having an option like this is to have a net
reduction in complexity.

I think it can be argued that it's bad UI design though to have --force
mean different things depending on the config, and we'd be better off
with a patch that disables --force.

  parent reply	other threads:[~2017-07-05 11:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-03 21:18 [PATCH] push: add config option to --force-with-lease by default Francesco Mazzoli
2017-07-03 21:47 ` Ævar Arnfjörð Bjarmason
2017-07-03 21:57   ` Francesco Mazzoli
2017-07-03 22:08   ` Francesco Mazzoli
2017-07-03 22:15 ` Ævar Arnfjörð Bjarmason
2017-07-03 22:28   ` Ævar Arnfjörð Bjarmason
2017-07-04 17:51 ` Junio C Hamano
2017-07-05  6:34   ` Francesco Mazzoli
2017-07-05  7:43     ` Junio C Hamano
2017-07-05  8:04       ` Francesco Mazzoli
2017-07-05 15:17         ` Junio C Hamano
2017-07-05 16:43           ` Francesco Mazzoli
2017-07-05 18:51             ` Mike Rappazzo
2017-07-06 19:13             ` Junio C Hamano
2017-07-07  6:19               ` Francesco Mazzoli
2017-07-05 11:26       ` Ævar Arnfjörð Bjarmason [this message]
2017-07-05 15:48         ` Ævar Arnfjörð Bjarmason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eftvazvk.fsf@gmail.com \
    --to=avarab@gmail.com \
    --cc=f@mazzo.li \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).