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

Re: [RFC PATCH] status: avoid reporting worktrees as "Untracked files"

From
Edmundo Carmona Antoranz <eantoranz@gmail.com>
Date
Nov 11, 2023, 09:22 UTC
Message-ID
<CAOc6etbowajhHsctFJN4ZQ0gND0jzZUrhEkep_pLYtE9y9RBCQ@mail.gmail.com>
In-Reply-To
<xmqqjzqygg3i.fsf@gitster.g>
Hey, guys! Thanks Junio and Eric for sharing your thoughts.
And I candidly thought this was going to be an "easy sell".... :-D
On Sat, Nov 4, 2023 at 7:58 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
>
> What problem are you trying to solve?  "git add foo" where "foo" is
> actually a different worktree of the repository would add it as a
> submodule that causes confusion?  If that is the case, I think the
> right solution is not to get into such a state, i.e. not create a
> worktree of the repository inside a different worktree in the first
> place.
>

I am not against the idea of creating worktrees outside of the repository... however, I like them to be _inside_ the repository. Am I the only one? IDK. I might be! It feels completely natural, if you ask me.... but that's just my opinion, I acknowledge that.

While I was running a couple of quick tests to add more information about git behaviour with "my use case" I think I found something to work on so more RFCs might be on the way in the next few days or weeks.

About adding an error message when 'git add' will skip doing something because it is working on a different worktree, I think it makes sense.... will probably work on that too.

Thanks again! BR!
Previous: Junio C HamanoNext: Eric Sunshine
Message 4 of 6 in “status: avoid reporting worktrees as "Untracked files"”
  1. status: avoid reporting worktrees as "Untracked files"Edmundo Carmona Antoranz, Nov 4, 2023
  2. Eric SunshineNov 4, 2023
  3. Junio C HamanoNov 4, 2023
  4. Edmundo Carmona AntoranzNov 11, 2023
  5. Eric SunshineNov 12, 2023
  6. Junio C HamanoNov 12, 2023

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.