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
22 gix-pathspec::pathspec parse::baseline
33 gix-pathspec::pathspec parse::valid::glob_negations_are_always_literal
44 gix-pathspec::pathspec parse::valid::whitespace_in_pathspec
5−gix-pathspec::pathspec search::files
6−gix-pathspec::pathspec search::prefixes_are_always_case_sensitive
75 gix-submodule::submodule file::baseline::common_values_and_names_by_path
86 gix-submodule::submodule file::is_active_platform::pathspecs_matter_even_if_they_do_not_match
97 gix-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
3232 for p in bar bAr BAR foo/bar foo/bAr foo/BAR fOo/bar fOo/bAr fOo/BAR FOO/bar FOO/bAr FOO/BAR; do
3333 git -c core.ignoreCase=false update-index --add --cacheinfo 100644 "$(git rev-parse HEAD:goo)" "$p"
3434 done
35−git -c core.ignoreCase=false update-index --add --cacheinfo 100644 "$(git rev-parse HEAD:goo)" " " # 4 x space
36−git -c core.ignoreCase=false update-index --add --cacheinfo 100644 "$(git rev-parse HEAD:goo)" " hi " # 2 x space hi 2 x space
35+git -c core.protectNTFS=false update-index --add --cacheinfo 100644 "$(git rev-parse HEAD:goo)" " " # 4 x space
36+git -c core.protectNTFS=false update-index --add --cacheinfo 100644 "$(git rev-parse HEAD:goo)" " hi " # 2 x space hi 2 x space
3737
3838 git ls-files > paths
3939