Jakub Narebski <jna...@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" ? :-)
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.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html