UNPKG

@baseplate-dev/sync

Version:

Library for syncing Baseplate descriptions

44 lines 1.61 kB
import type { StringMergeAlgorithm } from './types.js'; /** * Configuration for a Git merge driver to be used by the generator. */ export interface GitMergeDriverConfig { /** * A human-readable name for the merge driver (used for logging/debugging). */ name: string; /** * The command template to execute the merge driver. * It should include placeholders like %O (base), %A (ours/current), %B (theirs/other). * See Git documentation for `merge.driver` configuration for all placeholders. * Example: 'my-custom-merge %O %A %B' * Example: '/usr/bin/diff3 -m %A %O %B > %A' (Simulates diff3 merge, writing to %A) * * See https://git-scm.com/docs/gitattributes#_defining_a_custom_merge_driver */ driver: string; /** * Optional: The conflict marker size to pass via %L. Defaults to 7. */ conflictMarkerSize?: number; /** * Optional: Label for the base version (%S). Defaults to 'BASE'. */ labelBase?: string; /** * Optional: Label for the other/theirs version (%X). Defaults to 'BASEPLATE'. */ labelOther?: string; /** * Optional: Label for the current/ours version (%Y). Defaults to 'CURRENT'. */ labelCurrent?: string; } /** * Generates a StringMergeAlgorithm that uses an external Git merge driver. * * @param config - Configuration for the Git merge driver. * @returns A StringMergeAlgorithm function. */ export declare const gitMergeDriverAlgorithmGenerator: (config: GitMergeDriverConfig) => StringMergeAlgorithm; //# sourceMappingURL=git-merge-driver.d.ts.map