From: Mike Rappazzo <rappazzo@gmail.com>
To: Francesco Mazzoli <f@mazzo.li>
Cc: Junio C Hamano <gitster@pobox.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] push: add config option to --force-with-lease by default.
Date: Wed, 5 Jul 2017 14:51:10 -0400 [thread overview]
Message-ID: <CANoM8SXVYHfHqhf7oNfNUeDUWfpc9QGd8hvxu+g94aWEfQ1ZDQ@mail.gmail.com> (raw)
In-Reply-To: <EA42AB04-D538-4B4A-BC19-CAE9A80EEA76@mazzo.li>
On Wed, Jul 5, 2017 at 12:43 PM, Francesco Mazzoli <f@mazzo.li> wrote:
>> 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
I am in your camp on this, and I will also only ever explicitly fetch.
I would hate for --force-with-lease to disappear.
However, I believe that the problem is that there are many third party
tools which do a fetch behind the scenes (for example Atlassian
SourceTree). This can update the local refs without a user
necessarily thinking about it. This can lead to a force-with-lease
being used unsafely (without the stated lease).
_Mike
next prev parent reply other threads:[~2017-07-05 18:51 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 [this message]
2017-07-06 19:13 ` Junio C Hamano
2017-07-07 6:19 ` Francesco Mazzoli
2017-07-05 11:26 ` Ævar Arnfjörð Bjarmason
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=CANoM8SXVYHfHqhf7oNfNUeDUWfpc9QGd8hvxu+g94aWEfQ1ZDQ@mail.gmail.com \
--to=rappazzo@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).