MergerInterface
Interface
Merges export-ignore entries with existing .gitattributes content.
Description
This interface defines the contract for managing .gitattributes files, specifically handling the merging of canonical export-ignore rules with existing custom entries while removing obsolete generated markers and duplicate lines.
Methods
merge()
: string
Merges generated export-ignore entries with existing .gitattributes content.
Methods
Merges generated export-ignore entries with existing .gitattributes content.
public
merge(
string
$existingContent,
array<int, string>
$exportIgnoreEntries[,
array<int, string>
$keepInExportPaths = []]) : string
Parameters
$existingContent
:
string
Description
The current .gitattributes content.
$exportIgnoreEntries
:
array<int, string>
Description
The export-ignore entries to manage
$keepInExportPaths
:
array<int, string>
=
[]
Description
The paths that MUST remain exported
Return values
string
Description
The merged .gitattributes content