Re: [PATCH v3 0/6]
- From
Philip Oakley <philipoakley@iee.org>
- Date
- Jul 23, 2013, 21:26 UTC
- Message-ID
- <68F84DC48FCA4226A8F3C00AC42A9598@PhilipOakley>
- In-Reply-To
- <7v8v0x874x.fsf@alter.siamese.dyndns.org>
From: "Junio C Hamano" <gitster@pobox.com> Sent: Tuesday, July 23, 2013 7:26 PM
Show 13 quoted lines
> Jakub Narebski <jnareb@gmail.com> writes: > >> Junio C Hamano <gitster <at> pobox.com> writes: >> >>> >>> This is mostly unchanged since the previous round, except that >>> >>> * The option is spelled "--force-with-lease=<ref>:<expect>". >>> Nobody liked "cas" as it was too technical, many disliked >>> "lockref" because "lock" sounded as if push by others were >>> excluded by it while in fact this is to fail us. >> >> Perhaps "--force-gently" ? :-)
Or "--force-carefully" to better indicate the safety / care that is being applied?
Show 22 quoted lines
> > Hmph. But we usually use "gently" to mean "do not give the end user > an error message--the caller handles the error itself". > > While the option lets you break the usual "must fast-forward" rule, > it is more precise in that the remote ref must be pointing at not > just any ancestor of what you are pushing, but has to be at the > exact commit you specify. > > E.g. if you have built one commit on top of the shared branch, and > try to push it with "push --cas=pu:HEAD^ HEAD:pu" (because you know > one commit before the tip is where you started from), your push will > be rejected if somebody else did an equivalent of "reset HEAD~3" on > the receiving end (perhaps because the top commits recorded some > material inappropriate for the project). Your new commit is still a > decendant of that rewound tip, and usual "must fast-forward" rule > would accept the push, but with "push --cas=pu:HEAD^ HEAD:pu", you > will notice that somebody wanted to rewind the tip and pushing your > work that contains these dropped commit contradicts with that wish. > > So I dunno. > --