git_merge_driver_register

Register a merge driver under a given name.

As mentioned elsewhere, the initialize callback will not be invoked immediately. It is deferred until the driver is used in some way.

Currently the merge driver registry is not thread safe, so any registering or deregistering of merge drivers must be done outside of any possible usage of the drivers (i.e. during application setup or shutdown).

package extern (C) nothrow @nogc
int
git_merge_driver_register
(
const(char)* name
,)

Parameters

name const(char)*

The name of this driver to match an attribute. Attempting to register with an in-use name will return git_error_code.GIT_EEXISTS.

driver .git_merge_driver*

The merge driver definition. This pointer will be stored as is by libgit2 so it must be a durable allocation (either static or on the heap).

Return Value

Type: int

0 on successful registry, error code <0 on failure

Meta