Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Windows-related -c options in match_baseline_files #1871

Merged
merged 1 commit into from
Mar 11, 2025

Conversation

EliahKagan
Copy link
Member

@EliahKagan EliahKagan commented Mar 2, 2025

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

This includes a regenerated archive (generated on Arch Linux with Git 2.48.1) and updates etc/test-fixtures-windows-expected-failures-see-issue-1358.txt to remove the two tests that now pass on Windows even with GIX_TEST_IGNORE_ARCHIVES=1.

The test-fixtures-windows job currently fails here due to #1849, the same as on main if CI is rerun there, as described in #1849 (comment). If #1870 is merged, the failures should go away. This PR could be rebased after merging if #1870, if desired.

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
@Byron Byron force-pushed the run-ci/pathspec-search branch from f8b3bb9 to 68bdccc Compare March 11, 2025 15:35
@Byron Byron enabled auto-merge March 11, 2025 15:36
@Byron
Copy link
Member

Byron commented Mar 11, 2025

Thanks so much, this is great!

I hope the auto-merge goes through now that the commit was rebased.

@Byron Byron merged commit f58897d into GitoxideLabs:main Mar 11, 2025
21 checks passed
@EliahKagan
Copy link
Member Author

EliahKagan commented Mar 11, 2025

I hope the auto-merge goes through now that the commit was rebased.

The merge went through and it looks like everything is fine. But I'm not sure what got in the way before the last rebase. (From your wording, I presume there was a conflict or that some test failed.)

To the best of my knowledge, the only other recent changes to a file changed here was in cdee7ff (added to #1882) and d340263 (in #1870) which reverted it. The changed file was etc/test-fixtures-windows-expected-failures-see-issue-1358.txt, but those PRs didn't change any of the lines that were removed here, nor did it change any lines immediately adjacent to them.

So I don't know why there would have been a conflict. (I wonder if I made a mistake in the preceding rebase I did, from 3fc0264 to f8b3bb9, and used the wrong base, or something?)

Anyway, I'm not worried about it. Please feel free to ignore this if you like. 😄

@EliahKagan EliahKagan deleted the run-ci/pathspec-search branch March 11, 2025 21:58
@Byron
Copy link
Member

Byron commented Mar 12, 2025

I don't think there was any conflicts for me, the rebase went through cleanly. Maybe that's the problem - a bad cherry-pick with unexpected results?
If you know what's off, I think then it should definitely be fixed - I had no intention to do anything beyond rebasing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants