From: Goss Geppert <ggossdev@xxxxxxxxx> Attempt #2 to send this. It seems sending patch v4 2/2 resulted in an error with the outgoing server. Original message below: This latest version of the patch series contains relatively minor modifications relative to the previous version. Let me know if there is anything else I need to do. Changes compared to v3: * remove the commit that caches the gitdir's realpath as this was deemed a premature optimization given the amount of code churn * use git option `-C` in some of the testcases to avoid creating a subshell Goss Geppert (2): dir: traverse into repository dir: minor refactoring / clean-up dir.c | 35 ++++- t/t2205-add-worktree-config.sh | 265 +++++++++++++++++++++++++++++++++ 2 files changed, 293 insertions(+), 7 deletions(-) create mode 100755 t/t2205-add-worktree-config.sh Range-diff against v3: 1: 0fc8886f1e ! 1: f84cefe731 dir: traverse into repository @@ t/t2205-add-worktree-config.sh (new) + ( + cd test1 && + local parent_dir="$(pwd)" && -+ ( -+ cd repo && -+ git ls-files -o --exclude-standard "$parent_dir" >../actual-all-unsorted -+ ) && ++ git -C repo ls-files -o --exclude-standard "$parent_dir" >actual-all-unsorted && + sort actual-all-unsorted >actual-all && + sort expect-all-unsorted >expect-all && + test_cmp expect-all actual-all @@ t/t2205-add-worktree-config.sh (new) + ( + cd test1 && + local parent_dir="$(pwd)" && -+ ( -+ cd repo && -+ git ls-files -o --directory --exclude-standard "$parent_dir" >../actual-all-dir-unsorted -+ ) && ++ git -C repo ls-files -o --directory --exclude-standard "$parent_dir" >actual-all-dir-unsorted && + sort actual-all-dir-unsorted >actual-all && + sort expect-all-dir-unsorted >expect-all && + test_cmp expect-all actual-all @@ t/t2205-add-worktree-config.sh (new) + ( + cd test1 && + local parent_dir="$(pwd)" && -+ ( -+ cd repo && -+ git ls-files -o --exclude-standard "$parent_dir" >../actual-untracked-unsorted -+ ) && ++ git -C repo ls-files -o --exclude-standard "$parent_dir" >actual-untracked-unsorted && + sort actual-untracked-unsorted >actual-untracked && + sort expect-untracked-unsorted >expect-untracked && + test_cmp expect-untracked actual-untracked 2: a80cbd5517 < -: ---------- dir: cache git_dir's realpath 3: 899c69300c = 2: d4ff1bd40a dir: minor refactoring / clean-up -- 2.36.0