History

Fix Windows-related `-c` options in `match_baseline_files`

The `match_baseline_files.sh` fixture script adds entries to the index using `git update-index --add --cacheinfo`. These entries don't exist on disk, so it should be okay that some would cause problems on Windows if an attempt were made to actually create them. The tests that use the generated repository work on Windows. It is intended that the fixture script also be able to run on Windows, and Windows-related `-c` options are passed in commands where they are expected to be needed: `core.ignoreCase=false` and `core.protectNTFS=false`. But the fixture script nonetheless was failing on Windows because two commands that don't need `core.ignoreCase=false` but *do* need `core.protectNTFS=false` had `core.ignorecase=false` instead. This corrects that. This fixes two of the long-standing `GIX_TEST_IGNORE_ARCHIVES=1` Windows failures reported in #1358: - gix-pathspec::pathspec search::files - gix-pathspec::pathspec search::prefixes_are_always_case_sensitive

Eliah Kagan committed 1 year ago

Commit 68bdccc1 parent 1ed68f33 files · +1 −3Browse files

Unified · Split

3 files
  1. etc/test-fixtures-windows-expected-failures-see-issue-1358.txt +0 −2
  2. gix-pathspec/tests/fixtures/generated-archives/match_baseline_files.tar +0 −0
  3. gix-pathspec/tests/fixtures/match_baseline_files.sh +2 −2
etc/test-fixtures-windows-expected-failures-see-issue-1358.txt+0−2
@@ -2,8 +2,6 @@ gix-glob::glob pattern::matching::compare_baseline_with_ours · 1 unmodified line
2gix-pathspec::pathspec parse::baseline2gix-pathspec::pathspec parse::baseline
3gix-pathspec::pathspec parse::valid::glob_negations_are_always_literal3gix-pathspec::pathspec parse::valid::glob_negations_are_always_literal
4gix-pathspec::pathspec parse::valid::whitespace_in_pathspec4gix-pathspec::pathspec parse::valid::whitespace_in_pathspec
5gix-pathspec::pathspec search::files
6gix-pathspec::pathspec search::prefixes_are_always_case_sensitive
7gix-submodule::submodule file::baseline::common_values_and_names_by_path5gix-submodule::submodule file::baseline::common_values_and_names_by_path
8gix-submodule::submodule file::is_active_platform::pathspecs_matter_even_if_they_do_not_match6gix-submodule::submodule file::is_active_platform::pathspecs_matter_even_if_they_do_not_match
9gix-submodule::submodule file::is_active_platform::submodules_with_active_config_are_considered_active_or_inactive7gix-submodule::submodule file::is_active_platform::submodules_with_active_config_are_considered_active_or_inactive
gix-pathspec/tests/fixtures/generated-archives/match_baseline_files.tar+0−0

Binary file not shown.

gix-pathspec/tests/fixtures/match_baseline_files.sh+2−2
@@ -32,8 +32,8 @@ git update-index --add --cacheinfo 100644 "$(git rev-parse HEAD:goo)" "!a" · 31 unmodified lines
32for p in bar bAr BAR foo/bar foo/bAr foo/BAR fOo/bar fOo/bAr fOo/BAR FOO/bar FOO/bAr FOO/BAR; do32for p in bar bAr BAR foo/bar foo/bAr foo/BAR fOo/bar fOo/bAr fOo/BAR FOO/bar FOO/bAr FOO/BAR; do
33 git -c core.ignoreCase=false update-index --add --cacheinfo 100644 "$(git rev-parse HEAD:goo)" "$p"33 git -c core.ignoreCase=false update-index --add --cacheinfo 100644 "$(git rev-parse HEAD:goo)" "$p"
34done34done
35git -c core.ignoreCase=false update-index --add --cacheinfo 100644 "$(git rev-parse HEAD:goo)" " " # 4 x space35git -c core.protectNTFS=false update-index --add --cacheinfo 100644 "$(git rev-parse HEAD:goo)" " " # 4 x space
36git -c core.ignoreCase=false update-index --add --cacheinfo 100644 "$(git rev-parse HEAD:goo)" " hi " # 2 x space hi 2 x space36git -c core.protectNTFS=false update-index --add --cacheinfo 100644 "$(git rev-parse HEAD:goo)" " hi " # 2 x space hi 2 x space
37 37
38git ls-files > paths38git ls-files > paths
39 39