Repository navigation
Run GitRepositoryTests.testRawRepository on Windows - #10680
Open
Kernel-Hunter wants to merge 1 commit into
Open
Kernel-Hunter wants to merge 1 commit into
Kernel-Hunter wants to merge 1 commit into
Conversation
The archived test repository has files whose names Windows doesn't allow (a\b, a"b and others), so tar.exe failed and the test was skipped. The test reads those names from the object database only, so extract the archive without the funny-names working-tree files on Windows. Fixes swiftlang#8385
Kernel-Hunter
requested review from
bkhouri,
bripeticca,
cmcgee1024,
daveinglis,
daveyc123,
dschaefer2,
jakepetroules,
owenv,
plemarquand and
rconnell9
as code owners
October 14, 2026 22:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Run
GitRepositoryTests.testRawRepositoryon Windows by leaving the non-portable working-tree files out of the extraction.Motivation:
Fixes #8385.
TestRepo.tgzcontains a checked-outfunny-namesdirectory with files nameda\b,a"b,a\nband similar.tar.execan't create those on Windows ("Invalid argument"), so the extraction step fails and the test has been skipped there.The test only reads
funny-namesthrough the object database (readCommit,readTreeon commita7b19a7). It never touches the working-tree copies.Modifications:
--exclude "*/funny-names/*", with a short comment saying why.XCTSkipOnWindowsfor Fix GitRepositoryTests.testRawRepository on Windows #8385. The skip for Git Repository Tests are hanging on the Windows CI job #8564 (skipSelfHostedCI: true) stays, since that hang is a separate problem.Result:
The test runs on Windows outside the self-hosted CI. No change on other platforms.
How I checked it:
tar -x --exclude '*/funny-names/*'on the archive, thengit ls-tree a7b19a7still listsREADME.txt,funny-namesandsubdir, and1.0andmainresolve to the same commit.windows-latest,tar.exe): the current command fails withCan't create ... funny-names\a\b: Invalid argument. The new command extracts cleanly, and the same values the test asserts come back from git:mainequals1.0^{commit}, the initial commita8b9fcbf...and tree9d463c3b..., and the three entries of thea7b19a7tree.I couldn't run the Swift test itself on Windows. A plain build of
mainthere currently fails in theswift-buildcheckout (FileDescriptor.OpenOptionshas no membercloseOnExec), which also shows up in other PR runs today, so I checked the extraction and the git reads directly instead.