Repository navigation
archive: allow colons in filenames while keeping NTFS dotgit ADS checks - #2600
Closed
ansh-rohilla wants to merge 1 commit into
Closed
ansh-rohilla wants to merge 1 commit into
ansh-rohilla wants to merge 1 commit into
Conversation
Owner
|
See AI policy. |
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.
Fixes #2597.
Summary
b":"from_UNSAFE_PATH_CHARSindulwich/archive.pyso ordinary tree entry filenames containing colons (such asusb:btusb) are exported bytar_stream, matchinggit archiveanddulwich/index.pycheckout path validation (index: match git on invalid checkout paths #2235)._is_ntfs_dotgitfromdulwich/index.pyin_is_unsafe_archive_path()so NTFS.git/git~1alternate-data-stream spellings (e.g..git::$INDEX_ALLOCATION,.git:hidden,git~1:stream) remain rejected.test_unsafe_paths_rejectedand addtest_colon_in_filename_allowedintests/test_archive.py.Testing
python3 -m unittest tests.test_archive tests.test_server -v(92 tests OK)python3 -m unittest tests.test_archive tests.test_index -v(225 tests OK, 6 Windows-only skipped)ruff check .&ruff format --check .mypy dulwich/archive.py