From: Junio C Hamano <gitster@pobox.com>
To: Elijah Newren <newren@gmail.com>
Cc: Kyle Meyer <kyle@kyleam.com>, Git Mailing List <git@vger.kernel.org>
Subject: Re: [BUG?] ls-files -o now traverses nested repo when given multiple pathspecs
Date: Wed, 04 Dec 2019 11:42:02 -0800 [thread overview]
Message-ID: <xmqqblsn514l.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CABPp-BFG3FkTkC=L1v97LUksndkOmCN8ZhNJh5eoNdquE7v9DA@mail.gmail.com> (Elijah Newren's message of "Wed, 4 Dec 2019 09:30:41 -0800")
Elijah Newren <newren@gmail.com> writes:
> C) ls-files -o should NOT traverse into untracked submodules, but
> should at least report their directory name.
I think this probably is the most sensible.
The top-level directory of a working tree of a repository other than
the current one may exist in the working tree. It is very tempting
to declare that, unless we know it is a submodule that has the
current repository as its superproject, we should just treat it as a
normal subdirectory without *any* files tracked by the current
repository, which would mean that we pretend that the ".git/" in
that subdirectory is not any special---but that would obviously make
things quite messy (e.g. our "ls-files -o" would descend into the
other project's working tree and even in its .git/ directory), so we
need to special case a directory that has ".git/" in it, whether it
is a submodule for our current repository or not.
Thanks for working on this. I agree that dir.c traversal has become
messier and messier, especially with its interaction with
submodules.
next prev parent reply other threads:[~2019-12-04 19:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-03 22:08 [BUG?] ls-files -o now traverses nested repo when given multiple pathspecs Kyle Meyer
2019-12-04 17:30 ` Elijah Newren
2019-12-04 19:42 ` Junio C Hamano [this message]
2019-12-04 20:04 ` Kyle Meyer
2019-12-08 5:31 ` Kyle Meyer
2019-12-08 5:42 ` Elijah Newren
2019-12-08 7:46 ` Elijah Newren
2019-12-08 22:59 ` Kyle Meyer
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=xmqqblsn514l.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=kyle@kyleam.com \
--cc=newren@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).