Re: Tools that do an automatic fetch defeat "git push --force-with-lease"
- From
Jeff King <peff@peff.net>
- Date
- Apr 11, 2017, 12:50 UTC
- Message-ID
- <20170411125054.23ivvoyqj6y4suyo@sigill.intra.peff.net>
- In-Reply-To
- <1n4bn17.oag6uj12fkc2fM%lists@haller-berlin.de>
On Tue, Apr 11, 2017 at 02:37:27PM +0200, Stefan Haller wrote:
Show 9 quoted lines
> > I agree that probably makes the multiple-operation stuff go away, which
> > is nice. It does raise the question of when the integration point
> > happens, and how we handle alternate paths through which commits may
> > land in a local branch (e.g., if both you and upstream do a ff-merge of
> > a particular branch).
>
> Are you talking about the case where the user doesn't say git pull, but
> instead says "git fetch && git merge --ff @{u}"? Just so that I
> understand the concern.Yes, that (which is the main way that I merge changes). But also what happens with:
git merge origin/other-branch git rebase origin/master
I think we only care when origin/master has independently merged other-branch, too. And even though we have taken its commits into account, we would fail (because "both sides did the same thing" is really out of scope for the concept of a lease). So that's OK.
-Peff