git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stefan Haller <haller@ableton.com>
To: Jeff King <peff@peff.net>, Jacob Keller <jacob.keller@gmail.com>
Cc: "Ævar Arnfjör? Bjarmason" <avarab@gmail.com>,
	"Matt McCutchen" <matt@mattmccutchen.net>,
	git <git@vger.kernel.org>, "Junio C Hamano" <gitster@pobox.com>
Subject: Re: Tools that do an automatic fetch defeat "git push --force-with-lease"
Date: Sun, 9 Apr 2017 10:38:42 +0200	[thread overview]
Message-ID: <1n47m37.1xocjxu1j1pyM%haller@ableton.com> (raw)
In-Reply-To: <20170408221302.e7sv6cy4xayr2w7o@sigill.intra.peff.net>

Jeff King <peff@peff.net> wrote:

> > It might be possible to generate these lease tags prior to operations
> > which modify history and then maybe having a way to list them so you
> > can select which one you meant when you try to use force-with-lease..
> 
> So yeah, I think that is the more interesting direction. I hadn't
> considered resolving the multiple-operation ambiguity at push time. But
> I guess it would be something like "you did a rebase on sha1 X at time
> T, and then one on Y at time T+N", and you pick which one you're
> expecting.

I think it's wrong to think about these leases as something that you
take before you start a rewindy operation. That's the wrong time to take
the lease; by that time, the remote tracking branch may already contain
new things that you haven't seen yet, so using that as a lease at that
time will overwrite those things later. You have to take the lease at a
time where you know that your local branch and the remote tracking
branch are up to date with each other, which is after pull and push. And
if you do that, there's no multiple-operation ambiguity to deal with at
all.

> And I think that may be converging on the "integrate" refs that Stefan is
> talking about elsewhere (or some isomorphism of it).

Does it make things clearer if we don't use the term "integrate", but
call the config value in my proposal simply "branch.*.lease"?


-- 
Stefan Haller
Ableton
http://www.ableton.com/

  parent reply	other threads:[~2017-04-09  9:08 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-08  2:15 Tools that do an automatic fetch defeat "git push --force-with-lease" Matt McCutchen
2017-04-08  7:24 ` Stefan Haller
2017-04-08  7:35 ` Ævar Arnfjörð Bjarmason
2017-04-08  9:29   ` Jeff King
2017-04-08 10:10     ` Jakub Narębski
2017-04-08 11:41       ` [PATCH] push: document & test --force-with-lease with multiple remotes Ævar Arnfjörð Bjarmason
2017-04-09  9:55         ` Simon Ruderich
2017-04-09 11:40           ` Ævar Arnfjörð Bjarmason
2017-04-17  3:56         ` Junio C Hamano
2017-04-19  9:22           ` [PATCH v2] " Ævar Arnfjörð Bjarmason
2017-04-08 21:54     ` Tools that do an automatic fetch defeat "git push --force-with-lease" Jacob Keller
2017-04-08 22:13       ` Jeff King
2017-04-08 22:21         ` Jacob Keller
2017-04-09  8:38         ` Stefan Haller [this message]
2017-04-09  8:49           ` Jacob Keller
2017-04-09 11:00             ` Stefan Haller
2017-04-10  8:08               ` Jacob Keller
2017-04-10  9:58                 ` Ævar Arnfjörð Bjarmason
2017-04-10 23:33                   ` Jacob Keller
2017-04-11  8:51                     ` Junio C Hamano
2017-04-12  9:11                       ` Stefan Haller
2017-07-06 18:56                       ` [PATCH] push: disable lazy --force-with-lease by default Junio C Hamano
2017-07-06 19:38                         ` Stefan Beller
2017-07-06 22:39                           ` Junio C Hamano
2017-07-06 22:42                             ` Stefan Beller
2017-07-10 22:32                             ` Stefan Beller
2017-07-07  9:24                         ` Stefan Haller
2017-07-07  9:42                           ` Jeff King
2017-07-07  9:54                           ` Ævar Arnfjörð Bjarmason
2017-07-07 15:15                             ` Junio C Hamano
2017-07-15 10:45                               ` Ævar Arnfjörð Bjarmason
2017-07-17 17:28                                 ` Junio C Hamano
2017-07-07  9:39                         ` Ævar Arnfjörð Bjarmason
2017-04-11 12:37                   ` Tools that do an automatic fetch defeat "git push --force-with-lease" Stefan Haller
2017-04-11 12:37                 ` Stefan Haller
2017-04-10 18:31           ` Jeff King
2017-04-11 12:37             ` Stefan Haller
2017-04-11 12:50               ` Jeff King
2017-04-12  9:11                 ` Stefan Haller
2017-04-09  8:38       ` Stefan Haller
2017-04-09  8:46         ` Jacob Keller
2017-04-08  8:25 ` Jacob Keller
2017-04-08  9:31   ` Jeff King
2017-04-08 15:03     ` Stefan Haller
2017-04-08 22:03       ` Jeff King
2017-04-08 15:03 ` Stefan Haller
2017-04-08 16:04   ` Ævar Arnfjörð Bjarmason
2017-04-08 17:28     ` Stefan Haller
2017-04-12  9:11   ` Stefan Haller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1n47m37.1xocjxu1j1pyM%haller@ableton.com \
    --to=haller@ableton.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jacob.keller@gmail.com \
    --cc=matt@mattmccutchen.net \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).