From: Junio C Hamano <gitster@pobox.com>
To: Edmundo Carmona Antoranz <eantoranz@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC PATCH] status: avoid reporting worktrees as "Untracked files"
Date: Sat, 04 Nov 2023 15:58:09 +0900 [thread overview]
Message-ID: <xmqqjzqygg3i.fsf@gitster.g> (raw)
In-Reply-To: <20231104000209.916189-1-eantoranz@gmail.com> (Edmundo Carmona Antoranz's message of "Sat, 4 Nov 2023 01:02:08 +0100")
Edmundo Carmona Antoranz <eantoranz@gmail.com> writes:
> Given that worktrees are tracked in their own special fashion separately,
> it makes sense to _not_ report them as "untracked".
My gut feeling is that a much better solution to the unstated
problem you are solving is to make sure that "git worktree add" will
complain and not allow adding a subdirectory of any existing working
tree of a repository as a new worktree.
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.
next prev parent reply other threads:[~2023-11-04 6:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-04 0:02 [RFC PATCH] status: avoid reporting worktrees as "Untracked files" Edmundo Carmona Antoranz
2023-11-04 6:15 ` Eric Sunshine
2023-11-04 6:58 ` Junio C Hamano [this message]
2023-11-11 9:22 ` Edmundo Carmona Antoranz
2023-11-12 17:13 ` Eric Sunshine
2023-11-12 23:52 ` Junio C Hamano
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=xmqqjzqygg3i.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=eantoranz@gmail.com \
--cc=git@vger.kernel.org \
/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).