Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-08-25 00:54:29 +0300
committerJunio C Hamano <gitster@pobox.com>2020-08-25 00:54:29 +0300
commit11f433f79c790bcb5feae71b0320161d7ab7dea7 (patch)
tree3e45944daa791896d03ab00afa52a0275c10273a /dir.c
parent9e8c7542cb1307b0a23c8bdc2a8e039ab6f11b17 (diff)
parentab282aa548b807c022d521e83d843e4585b89dbb (diff)
Merge branch 'en/dir-nonbare-embedded'
"ls-files -o" mishandled the top-level directory of another git working tree that hangs in the current git working tree. * en/dir-nonbare-embedded: dir: avoid prematurely marking nonbare repositories as matches t3000: fix some test description typos
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/dir.c b/dir.c
index fe64be30ed..502617b134 100644
--- a/dir.c
+++ b/dir.c
@@ -1792,9 +1792,12 @@ static enum path_treatment treat_directory(struct dir_struct *dir,
nested_repo = is_nonbare_repository_dir(&sb);
strbuf_release(&sb);
}
- if (nested_repo)
- return ((dir->flags & DIR_SKIP_NESTED_GIT) ? path_none :
- (excluded ? path_excluded : path_untracked));
+ if (nested_repo) {
+ if ((dir->flags & DIR_SKIP_NESTED_GIT) ||
+ (matches_how == MATCHED_RECURSIVELY_LEADING_PATHSPEC))
+ return path_none;
+ return excluded ? path_excluded : path_untracked;
+ }
if (!(dir->flags & DIR_SHOW_OTHER_DIRECTORIES)) {
if (excluded &&