git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Eric Sunshine <sunshine@sunshineco.com>,
	Russell Stuart <russell+git.vger.kernel.org@stuart.id.au>
Cc: git@vger.kernel.org
Subject: Re: "git worktree repair" modifies the wrong repository
Date: Tue, 24 Sep 2024 14:53:44 +0100	[thread overview]
Message-ID: <87afa860-52f4-414a-82da-09e7eeac1301@gmail.com> (raw)
In-Reply-To: <CAPig+cTop=2+k0XbqYbsCTbJVo77evY+_a+FqDV_ziKf2q+Dzw@mail.gmail.com>

On 23/09/2024 19:52, Eric Sunshine wrote:
> On Thu, Sep 19, 2024 at 7:40 AM Russell Stuart
> <russell+git.vger.kernel.org@stuart.id.au> wrote:
>> Interestingly, people (including me as it happens) start out by trying
>> to emulate the hg approach using a single parent directory to hold a
>> bare repository, and the child worktree directories.  Then they discover
>> bare repositories mangle the remote links, and give up on the idea.
> 
> Can you provide more details about this "mangling"? Although the
> use-case you describe was not directly considered in the initial
> design, worktrees hanging off a bare repository became an
> explicitly-supported use-case not long after worktrees were
> introduced. So, it should work properly and we know that people use
> worktrees this way, but we haven't had any reports of mangling in this
> scenario.

I can't speak for Russell but a while ago when I added a worktree to an 
existing bare repository I had to update remote.origin.fetch and 
remote.origin.mirror because "git clone --bare" implies "--mirror". I 
also needed to enable extensions.worktreeConfig and ensure core.bare was 
set appropriately.

Best Wishes

Phillip

  reply	other threads:[~2024-09-24 13:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-19  1:12 "git worktree repair" modifies the wrong repository Russell Stuart
2024-09-19  8:58 ` Eric Sunshine
2024-09-19 10:16   ` Russell Stuart
2024-09-19 10:47     ` Eric Sunshine
2024-09-19 11:40       ` Russell Stuart
2024-09-23 18:52         ` Eric Sunshine
2024-09-24 13:53           ` Phillip Wood [this message]
2024-10-03  6:28             ` Eric Sunshine
2024-10-04  9:15               ` phillip.wood123
2024-10-04 15:50                 ` Junio C Hamano
2024-09-25  9:31           ` Russell Stuart

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=87afa860-52f4-414a-82da-09e7eeac1301@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=russell+git.vger.kernel.org@stuart.id.au \
    --cc=sunshine@sunshineco.com \
    /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 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 NNTP newsgroup(s).