MergerInterface
Defines the contract for merging .gitignore entries.
Description
This service SHALL combine canonical and project-specific .gitignore definitions into a single normalized result. The resulting entry list MUST exclude blank lines and comment lines from the merged output, MUST remove duplicate entries, and MUST group directory entries before file entries. Directory and file groups SHALL be sorted independently in ascending string order to provide deterministic output.
Methods
Merges two GitIgnore instances, removing duplicates and sorting entries.
Merges two GitIgnore instances, removing duplicates and sorting entries.
public
merge(GitIgnoreInterface
$canonical, GitIgnoreInterface
$project) : GitIgnoreInterface
Description
Directories are placed before files in the resulting list. The path from $project is used in the returned instance.
Parameters
Description
the canonical .gitignore from dev-tools
Description
the project-specific .gitignore
Return values
Description
a new GitIgnore instance with merged entries