Repository navigation
Refuse a root that is, or lies inside, a CVS or _darcs folder [patch] - #216
Open
matt-edmondson wants to merge 1 commit into
Open
matt-edmondson wants to merge 1 commit into
matt-edmondson wants to merge 1 commit into
Conversation
FindVersionControlMetadata checked only the case-insensitive set of metadata names, so after #213 moved CVS and _darcs into the case-sensitive set, a root at or under them was scanned and deduplicated while the same folder below the root was skipped. Use IsVersionControlDirectoryName, as the walk does. Fixes #215 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017vfJW3u8Ga41rqFWd6Sy25
|
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 #215
What was wrong
#208 made every verb refuse a root that is, or lies inside, version-control metadata. But
FileScanner.FindVersionControlMetadatachecked onlyVersionControlDirectories, the case-insensitive set. #213 had already movedCVSand_darcsintoCaseSensitiveVersionControlDirectories, so the root check never saw them. As a result,-p proj/CVSor-p proj/_darcs/patcheswas scanned, and Deduplicate could delete byte-identical metadata files there. The same folders one level below the root were skipped, because the walk usesIsVersionControlDirectoryName, which checks both sets.Change
FindVersionControlMetadatanow usesIsVersionControlDirectoryName(current.Name), the same test the walk uses.CVSand_darcsare refused as roots. Other spellings (cvs,Cvs,_DARCS) are still ordinary folders, as #211 requires. The method's remarks note this.Tests
EveryVerbRefusesARootThatIsOrLiesInsideVersionControlMetadatahas two new rows,proj/CVSandproj/_darcs/patches, with matching identical files. All four verbs must exit 1, say why, and delete nothing.ARootNamedLikeCaseSensitiveMetadataInAnotherCaseIsStillScannedcoverscvs,Cvsand_DARCS. It keeps A user folder namedcvs,Cvsor_DARCSis silently left out of the scan: the VCS skip list ignores case #211's rule pinned at the root.Generated by Claude Code