aboutsummaryrefslogtreecommitdiffstats
path: root/commit-graph.c
diff options
context:
space:
mode:
authorGoss Geppert <ggossdev@gmail.com>2022-06-16 23:19:55 +0000
committerJunio C Hamano <gitster@pobox.com>2022-06-21 22:47:33 -0700
commit27128996b88f3dd0624324f8eb9648c0754cfa20 (patch)
treee8637f0c41193f7627d4247b8a058b4f9d74ba2a /commit-graph.c
parentGit 2.36 (diff)
downloadgit-27128996b88f3dd0624324f8eb9648c0754cfa20.tar.gz
git-27128996b88f3dd0624324f8eb9648c0754cfa20.zip
dir: traverse into repository
Since 8d92fb2927 (dir: replace exponential algorithm with a linear one, 2020-04-01) traversing into a repository's directory tree when the traversal began outside the repository's standard location has failed because the encountered repository was identified as a nested foreign repository. Prior to this commit, the failure to traverse into a repository's default worktree location was observable from a user's perspective under either of the following conditions (there may be others): 1) Set the `core.worktree` location to a parent directory of the default worktree; or 2) Use the `--git_dir` option while the working directory is outside the repository's default worktree location Under either of these conditions, symptoms of the failure to traverse into the repository's default worktree location include the inability to add files to the index or get a list of untracked files via ls-files. This commit adds a check to determine whether a nested repository that is encountered in recursing a path is actually `the_repository`. If so, we simply treat the directory as if it doesn't contain a nested repository. The commit includes test-cases to reduce the likelihood of future regressions. Signed-off-by: Goss Geppert <ggossdev@gmail.com> Reviewed-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions