Skip to content

Commit 8433260

Browse files
committed
Correct the POSIX backslash regression test
Exercise conditional-include matching without recursively merging includes. A backslash is a literal filename character on POSIX, so a pattern containing one must not match the otherwise equivalent slash-separated Git directory. Validation: test/test_config.py (33 passed, 2 skipped).
1 parent 721f623 commit 8433260

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

test/test_config.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,7 @@ def test_conditional_includes_preserve_posix_backslashes(self, rw_dir):
514514
with open(config_path, "w") as stream:
515515
stream.write(f'[includeIf "gitdir:{pattern}"]\n path={included_path}\n')
516516

517-
with GitConfigParser(config_path, repo=repo) as config:
518-
assert config._has_includes()
517+
with GitConfigParser(config_path, repo=repo, merge_includes=False) as config:
519518
assert config._included_paths() == []
520519

521520
@with_rw_directory

0 commit comments

Comments
 (0)