All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Hommey <mh@glandium.org>
To: git@vger.kernel.org
Subject: git rebase allows branches to be checked out in multiple worktrees
Date: Thu, 20 Feb 2020 09:29:32 +0900	[thread overview]
Message-ID: <20200220002932.5jws6qpnivlvxckw@glandium.org> (raw)

Hi,

I just noticed a quirk with git rebase vs. worktrees. While using e.g.
git checkout will prevent a same branch from being checked out from
multiple worktrees, that's not the case for git-rebase, so the following
scenario ends up with two checkouts of the same branch:

$ git checkout -b foo HEAD~
$ git commit --allow-empty -m foo 
$ git worktree add /tmp/bar master
$ cd /tmp/bar
$ git rebase master foo

Mike

             reply	other threads:[~2020-02-20  0:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-20  0:29 Mike Hommey [this message]
2020-02-23 10:14 ` [PATCH 0/2] git-rebase: refuse to switch to branch checked out elsewhere Eric Sunshine
2020-02-23 10:14   ` [PATCH 1/2] t3400: make test clean up after itself Eric Sunshine
2020-02-24  9:19     ` Eric Sunshine
2020-02-23 10:14   ` [PATCH 2/2] rebase: refuse to switch to branch already checked out elsewhere Eric Sunshine

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

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

  git send-email \
    --in-reply-to=20200220002932.5jws6qpnivlvxckw@glandium.org \
    --to=mh@glandium.org \
    --cc=git@vger.kernel.org \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.