From: "Michal Suchánek" <msuchanek@suse.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jason Cho <jason11choca@proton.me>,
"Jakub T. Jankiewicz" <jcubic@jcubic.pl>,
git@vger.kernel.org
Subject: Re: What is the reason behind not hiding git worktrees from git?
Date: Wed, 19 Nov 2025 09:13:53 +0100 [thread overview]
Message-ID: <aR18QQ03-Wg26oNJ@kitsune.suse.cz> (raw)
In-Reply-To: <xmqqzfac3pts.fsf@gitster.g>
On Tue, Sep 30, 2025 at 08:47:11AM -0700, Junio C Hamano wrote:
> Michal Suchánek <msuchanek@suse.de> writes:
>
> > On Sat, Sep 27, 2025 at 09:26:54PM +0000, Jason Cho wrote:
> >> I think the best practice is to not add a work tre within the master work tree.
> >
> > And is that best practice documented somewhere?
>
> I do not think it is documented anywhere.
>
> In fact, I do not think the inventors of the worktree feature ever
> expected this end-user expectation that checking out multiple
> worktrees of the repository *INSIDE* a repository's checkout would
> be any useful without confusing users.
>
> IOW, omission of the documentation is by an assumptionk that nobody
> would imagine doing in any other way.
>
> We can and should fix it retroactively, if the lack of documentation
> is not guiding our users in the right direction. Any takers?
>
> > IIRC there are some VCSs for which it is common practice to keep
> > checkouts of multiple branches side by side in the repository directory.
>
> I can understand "side-by-side" but not "in". Next to the primary
> workree (aka "initial clone") would be more common.
>
> > IIRC the repository directory itself is not a checkout in this case.
> > Anyway, there is no obvious reason for anyone not familiar with git
> > internals to not do this.
>
> Meaning anybody not familiar with the tool would do any random thing
> outside of the usage pattern that the users of the tool have been
> establishing over the years? I can certainly understand that. But
> then, creating a set of worktrees, one per branch, next to the
> primary worktree that checks out the 'main' branch, would also equally
> be a likely layout, I would imagine.
And that's what the existing example shows.
Thanks
Michal
next prev parent reply other threads:[~2025-11-19 8:14 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-27 13:28 What is the reason behind not hiding git worktrees from git? Jakub T. Jankiewicz
2025-09-27 16:52 ` Junio C Hamano
2025-09-27 17:55 ` Michal Suchánek
2025-09-27 21:08 ` Jason Cho
2025-09-27 21:26 ` Jason Cho
2025-09-30 10:30 ` Michal Suchánek
2025-09-30 15:47 ` Junio C Hamano
2025-11-19 8:13 ` Michal Suchánek [this message]
2025-09-30 10:37 ` Michal Suchánek
2025-10-01 12:16 ` Ben Knoble
2025-10-01 18:54 ` Junio C Hamano
2025-10-01 20:22 ` Sergey Organov
2025-10-01 20:48 ` Junio C Hamano
2025-10-01 21:27 ` Jakub T. Jankiewicz
2025-10-01 22:07 ` Junio C Hamano
2025-10-01 21:29 ` Eric Sunshine
2025-10-01 22:27 ` Junio C Hamano
2025-10-02 8:38 ` Michal Suchánek
2025-10-02 13:33 ` Junio C Hamano
2025-10-02 15:51 ` [PATCH 1/2] doc: git-worktree: Link to examples Michal Suchanek
2025-10-02 17:42 ` Kristoffer Haugsbakk
2025-10-02 17:44 ` Junio C Hamano
2025-10-02 18:55 ` Michal Suchánek
2025-10-05 20:52 ` Jean-Noël AVILA
2025-10-10 17:10 ` Michal Suchánek
2025-10-10 17:04 ` [PATCH v2 " Michal Suchanek
2025-10-11 4:40 ` Eric Sunshine
2025-10-10 17:04 ` [PATCH v2 2/2] doc: git-worktree: Add side by side branch checkout example Michal Suchanek
2025-10-11 5:17 ` Eric Sunshine
2025-10-23 19:40 ` Junio C Hamano
2025-10-24 10:15 ` Michal Suchánek
2025-10-24 16:57 ` Eric Sunshine
2025-11-18 12:01 ` Michal Suchánek
2025-11-19 7:19 ` Eric Sunshine
2025-10-02 15:51 ` [PATCH " Michal Suchanek
2025-10-02 17:51 ` Kristoffer Haugsbakk
2025-10-02 18:46 ` Michal Suchánek
2025-10-02 18:47 ` Junio C Hamano
2025-10-02 18:06 ` Junio C Hamano
2025-10-02 18:39 ` Michal Suchánek
2025-11-17 22:36 ` What is the reason behind not hiding git worktrees from git? Johannes Schindelin
2025-11-17 22:57 ` Junio C Hamano
2025-10-02 2:33 ` Ben Knoble
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=aR18QQ03-Wg26oNJ@kitsune.suse.cz \
--to=msuchanek@suse.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jason11choca@proton.me \
--cc=jcubic@jcubic.pl \
/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).