Plain --force-with-lease considered dangerous on the Git list #4355
Replies: 1 comment 3 replies
-
It all depends on the workflow:
If you don't do that, then So I think Magit should enable
The question is how do we enable it by default. We could add it to the push popup and enable it by default. Most users would be confused by that and that is unfortunate because I expect most users would not actually be affected by this at all (because they don't do such a silly thing as pushing while fetching). So that would be a net negative. So I think we should just silently and unconditionally add that argument. Some users will notice and wonder about it, but I hope that doing it like this increases the odds that they will look up the documentation before asking others to explain it to them. IMO |
Beta Was this translation helpful? Give feedback.
-
I was thinking that since Magit’s default is to use
--force-with-lease
when i tell it toP -f P
, can i set it as the default in the git CLI?As it turns, i’m not the first to think of that, XonqNopp already asked this on the mailing list (emphasis mine in all quotes):
And Junio C Hamano replied, among other things:
Johannes Schindelin added that
Reading through the man page of
git
i strongly agree with Johannes here; what do you think of addingforce-if-includes
to the-f
switch of Magit? Would it be more safe? Would it even be feasible?Beta Was this translation helpful? Give feedback.
All reactions