Skip to content

Commit f8b3bb9

Browse files
committed
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 GitoxideLabs#1358: - gix-pathspec::pathspec search::files - gix-pathspec::pathspec search::prefixes_are_always_case_sensitive
1 parent 5443bf2 commit f8b3bb9

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

etc/test-fixtures-windows-expected-failures-see-issue-1358.txt

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ gix-glob::glob pattern::matching::compare_baseline_with_ours
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
Binary file not shown.

gix-pathspec/tests/fixtures/match_baseline_files.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ git update-index --add --cacheinfo 100644 "$(git rev-parse HEAD:goo)" "!a"
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

0 commit comments

Comments
 (0)