Skip to content

MergerInterface

github-actions edited this page Apr 11, 2026 · 1 revision

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 while removing obsolete generated markers and duplicate lines.


  • 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