Skip to content

MergerInterface

github-actions[bot] edited this page Oct 21, 2026 · 2 revisions

Merges export-ignore entries with existing .gitattributes content.

This interface defines the contract for managing .gitattributes files, specifically handling the merging of canonical export-ignore rules with existing custom entries. New defaults MUST precede consumer overrides; existing order and repeated rules MUST be retained.


  • Full name: \FastForward\DevTools\GitAttributes\MergerInterface

Methods

merge

Merges generated export-ignore entries with existing .gitattributes content.

public merge(string $existingContent, list<string> $exportIgnoreEntries, list<string> $keepInExportPaths = []): string

Parameters:

Parameter Type Description
$existingContent string The current .gitattributes content.
$exportIgnoreEntries list The export-ignore entries to manage
$keepInExportPaths list The paths that MUST remain exported

Return Value:

The merged .gitattributes content


Clone this wiki locally