git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v6 1/2] worktree: add 'for_each_worktree' function

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Aug 31, 2015, 19:47 UTC
Message-ID
<CAPig+cSweTu=t4vekV6ihAYSzdDHZMQdx-PRt9_+rYr9SrujPw@mail.gmail.com>
In-Reply-To
<CANoM8SUoJAPBwEO=udhaR0WcUkZropEJ5G_SESnkHVtAQHxJQQ@mail.gmail.com>
On Mon, Aug 31, 2015 at 2:57 PM, Mike Rappazzo <rappazzo@gmail.com> wrote:
Show 5 quoted lines
> I wasn't sure that a bare repo would be considered a worktree.  I
> don't think that it would be
> a good idea to include it.  In the same vein that I can't checkout a
> branch in a bare repo, it
> figure that it shouldn't be in the list.

I forgot to mention in my previous response that I have the opposite view, and think that a bare repo should be included in the output of "git worktree list". The reason is that the intention of "git worktree list" is to give the user a consolidated view of the locations of all components of his "workspace". By "workspace", I mean the repository (bare or not) and its worktrees.

In the typical case, the .git directory resides within the main worktree (the first item output by "git worktree list"), thus is easily found, however, if "git worktree list" hides bare repos, then the user will have no way to easily locate the repository (without resorting to lower-level commands or peeking at configuration files).

Previous: Eric SunshineNext: Mike Rappazzo
Message 10 of 14 in “worktree: for-each function and list command”
  1. 0/2 worktree: for-each function and list commandMichael Rappazzo, Aug 30, 2015
  2. 1/2 worktree: add 'for_each_worktree' functionMichael Rappazzo, Aug 30, 2015
  3. Eric SunshineAug 31, 2015
  4. Junio C HamanoAug 31, 2015
  5. David TurnerAug 31, 2015
  6. Eric SunshineAug 31, 2015
  7. David TurnerAug 31, 2015
  8. Mike RappazzoAug 31, 2015
  9. Eric SunshineAug 31, 2015
  10. Eric SunshineAug 31, 2015
  11. Mike RappazzoAug 31, 2015
  12. Eric SunshineAug 31, 2015
  13. 2/2 worktree: add 'list' commandMichael Rappazzo, Aug 30, 2015
  14. Eric SunshineAug 31, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.