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

Path filters: Recurse into directories if child entries may be included by filters #606

Merged
merged 4 commits into from May 29, 2021
Merged

Conversation

qmfrederik
Copy link
Contributor

GitExtensions.IsRelevantCommit will determine whether a commit is relevant when calculating version height. A commit is considered relevant if any of the files which are changed in that commit match the path filters.

This code relies on FilterPath.Includes to determine whether a specific path is included in by a path filter.

The unmanaged implementation gets a list of full file names, whereas the managed implementation recurses the directory tree.

This causes a bug where the managed implementation would not recurse into directories whose child items may be included.
For example, if you have a path filter to include src/lib, FilterPath.Includes("src") would return false, and changes to any files in src/lib/ would not be considered.

This should fix the root cause of #587.

@qmfrederik
Copy link
Contributor Author

@AArnott I updated the unit test you created to use / as a path separator instead of \.

@AArnott AArnott changed the base branch from master to v3.4 May 29, 2021 21:04
Copy link
Collaborator

@AArnott AArnott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I rebased your commits to get them so they can target v3.4 instead of master.

@AArnott AArnott modified the milestones: v3.5, v3.4 May 29, 2021
@AArnott AArnott linked an issue May 29, 2021 that may be closed by this pull request
@AArnott AArnott merged commit 19614e2 into dotnet:v3.4 May 29, 2021
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.

v3.4 regressed version height calculation involving path filters
2 participants