Re: [PATCH] push: add config option to --force-with-lease by default.

2017-07-06 Thread Francesco Mazzoli
On 6 July 2017 at 21:13, Junio C Hamano 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 workfl

Re: [PATCH] push: add config option to --force-with-lease by default.

2017-07-05 Thread Francesco Mazzoli
> On 5 Jul 2017, at 17:17, Junio C Hamano 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 preferrab

Re: [PATCH] push: add config option to --force-with-lease by default.

2017-07-05 Thread Francesco Mazzoli
On 5 July 2017 at 09:43, Junio C Hamano wrote: > On Tue, Jul 4, 2017 at 11:34 PM, Francesco Mazzoli 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 >> encoura

Re: [PATCH] push: add config option to --force-with-lease by default.

2017-07-04 Thread Francesco Mazzoli
On 4 July 2017 at 19:51, Junio C Hamano wrote: > People have been burned by the lazy "--force-with-lease" that does > not say what object to expect there and forces the command to DWIM > incorrectly what the remote's ref ought to be pointing at. This > change encourages its use without the user b

[PATCH] push: add config option to --force-with-lease by default.

2017-07-03 Thread Francesco Mazzoli
The flag can be overridden with `--no-force-with-lease`, or by passing the config via the command line. Signed-off-by: Francesco Mazzoli --- Documentation/config.txt | 5 + Documentation/git-push.txt | 4 +++- builtin/push.c | 3 +++ cache.h| 1 + config.c

Re: [PATCH] push: add config option to --force-with-lease by default.

2017-07-03 Thread Francesco Mazzoli
On 3 July 2017 at 23:47, Ævar Arnfjörð Bjarmason wrote: > > On Mon, Jul 03 2017, Francesco Mazzoli jotted: > > > The flag can be overridden with `--no-force-with-lease`, or by > > passing the config via the command line. > > Thanks for hacking on this. A couple of thi

[PATCH] push: add config option to --force-with-lease by default.

2017-07-03 Thread Francesco Mazzoli
The flag can be overridden with `--no-force-with-lease`, or by passing the config via the command line. Signed-off-by: Francesco Mazzoli --- Documentation/config.txt | 5 + builtin/push.c | 3 +++ cache.h | 1 + config.c | 4 environment.c