pub struct Driver {
pub name: BString,
pub display_name: BString,
pub command: BString,
pub recursive: Option<BString>,
}
Expand description
Define a driver program that performs a three-way merge.
Some values are related to diffing, some are related to conversions.
Fields§
§name: BString
The name of the driver, as referred to by [merge "name"]
in the git configuration.
display_name: BString
The human-readable version of name
, only to be used for displaying driver-information to the user.
command: BString
The command to execute to perform the merge entirely like <command> %O %A %B %L %P %S %X %Y
.
- %O
- the common ancestor version, or base.
- %A
- the current version, or ours.
- %B
- the other version, or theirs.
- %L
- The conflict-marker size as positive number.
- %P
- The path in which the merged result would be stored, as workspace-relative path, of the current/ours side.
- %S
- The conflict-label for the common ancestor or base.
- %X
- The conflict-label for the current version or ours.
- %Y
- The conflict-label for the other version or theirs.
Note that conflict-labels are behind the conflict markers, to annotate them.
A typical invocation with all arguments substituted could then look like this:
<driver-program> .merge_file_nR2Qs1 .merge_file_WYXCJe .merge_file_UWbzrm 7 file e2a2970 HEAD feature
The driver is expected to leave its version in the file at %A
, by overwriting it.
recursive: Option<BString>
If true
, this is the name
of the driver to use when a virtual-merge-base is created, as a merge of all
available merge-bases if there are more than one.
This value can also be special built-in drivers named text
, binary
or union
. Note that user-defined
drivers with the same name will be preferred over built-in ones, but only for files whose git attributes
specified the driver by name.