libgit2

git_merge_driver

Version:

Merge driver structure used to register custom merge drivers.

To associate extra data with a driver, allocate extra data and put the git_merge_driver struct at the start of your data buffer, then cast the self pointer to your larger structure when your callback is invoked.

Signature

typedef struct git_merge_driver { unsigned int version git_merge_driver_init_fn initialize git_merge_driver_shutdown_fn shutdown git_merge_driver_apply_fn apply };

Members

unsigned int
version

The version should be set to GIT_MERGE_DRIVER_VERSION.

initialize

Called when the merge driver is first used for any file.

shutdown

Called when the merge driver is unregistered from the system.

apply

Called to merge the contents of a conflict. If this function returns GIT_PASSTHROUGH then the default (text) merge driver will instead be invoked. If this function returns GIT_EMERGECONFLICT then the file will remain conflicted.

Returned By

Parameter To

Versions