Internals
Path matchers
- Remove irrelevant legacy methods:
TrimFileBaseFilepath
andBaseFilepath
- Redesign path matchers and divide them into simple entities
- base path
- include
- exclude
- dockerignore patterns
- true
- false
- complex
- multi
- Add factory constructor for easy and clear use
- Add the
ID
method to determine the path matcher parameters unambiguously - Fix multi path matcher the
ShouldGoThrough
method logic: the method returns true if theShouldGoThrough
method of at least one matcher returns true and the path partially or completely matched by others (IsDirOrSubmodulePathMatched
returns true) - Complete test coverage
Git
- Generalization of the calculating git repository files checksum
- Simplify the GetOrCreateChecksum method
- the method creates or gets a checksum from the cache
- the previous logic was specific to git mapping (it is taken out and based on the new implementation)
- The logic of stapel and dockerfile checksum calculation is reduced to one mechanism
- Simplify the GetOrCreateChecksum method
- Archive/Patch/LsTree: add the
PathScope
option to limit paths and determine the base directory/file (similar to <pathspec> in the git commands).
Other
- [util] Fix IsSubpathOfBasePath helper
- Incorrect processing of empty (
""
) and root ("/"
) basePath - Checking for identical paths returns true
- Incorrect processing of empty (