git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: "Ganriel Nützi" <gnuetzi@gmail.com>, "Git List" <git@vger.kernel.org>
Subject: Re: GIT_DIR output from git worktree list
Date: Sun, 13 Dec 2020 01:07:08 -0500	[thread overview]
Message-ID: <CAPig+cRZ-018Krj2fGq0hx5qNptW8qUiwhkws8ixvk242Z_b0g@mail.gmail.com> (raw)
In-Reply-To: <CACsJy8Dq9Lz1YkkqvR0Fa1PLUBJhNJTmLtnRssi=DDpWAQTWww@mail.gmail.com>

On Wed, Dec 9, 2020 at 4:31 AM Duy Nguyen <pclouds@gmail.com> wrote:
> On Wed, Dec 9, 2020 at 2:27 AM Eric Sunshine <sunshine@sunshineco.com> wrote:
> > What I was suggesting was that it might be the case that the only way
> > to solve this would be to store the location of the main worktree
> > somewhere within <repo> in some file, and then `git worktree list`
> > would consult that file to learn the location of the main worktree.
>
> Not that it matters because I don't do Git anymore. But when I was
> doing this I imagined unify main and secondary worktrees. When you
> switch from single to multiple worktrees, there is no main worktree
> anymore. The place that is main worktree still has your files, but it
> has the same status and treatment as any other worktree. And the repo
> is tucked away somewhere safe.

I had some vague thoughts along those lines, as well, but such a
change is outside the scope of my limited time these days.

Superficially, the idea I expressed above, of storing the path of the
main worktree in some file within the repository (let's say
`.git/mainworktreepath`) doesn't seem like it should be too difficult
(though I haven't really thought it through). And, if the main
worktree does get moved, the file could be fixed up or kept up-to-date
by the `git worktree repair` command.

(By the way, thanks for responding. It's nice to hear from you again
after your long absence.)

      reply	other threads:[~2020-12-13  6:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-29 17:30 GIT_DIR output from git worktree list Gabriel Nützi
2020-09-30  5:33 ` Eric Sunshine
2020-09-30  7:34   ` Gabriel Nützi
2020-09-30 20:35     ` Eric Sunshine
2020-12-07  4:34   ` Eric Sunshine
2020-12-07  7:28     ` Ganriel Nützi
2020-12-08 19:27       ` Eric Sunshine
2020-12-09  9:30         ` Duy Nguyen
2020-12-13  6:07           ` Eric Sunshine [this message]

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=CAPig+cRZ-018Krj2fGq0hx5qNptW8qUiwhkws8ixvk242Z_b0g@mail.gmail.com \
    --to=sunshine@sunshineco.com \
    --cc=git@vger.kernel.org \
    --cc=gnuetzi@gmail.com \
    --cc=pclouds@gmail.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.
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).