Path filters: Recurse into directories if child entries may be included by filters #606
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.
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 returnfalse
, and changes to any files insrc/lib/
would not be considered.This should fix the root cause of #587.