21#ifndef KIGIT_TRIVIAL_MERGE_BASE_H
22#define KIGIT_TRIVIAL_MERGE_BASE_H
36template <
typename DERIVED>
60 return GIT_EMERGECONFLICT;
63 static int Apply(
const git_merge_driver_source* aSrc,
const char** aPathOut,
64 unsigned int* aModeOut, git_buf* aMergedOut )
KIGIT_TRIVIAL_MERGE_BASE(git_merge_driver_source *aSource, git_buf *aBuf)
git_merge_driver_source * m_mergeDriver
static int Apply(const git_merge_driver_source *aSrc, const char **aPathOut, unsigned int *aModeOut, git_buf *aMergedOut)
int WriteToGitBuf(git_buf *aBuf, const std::string &aContent)
Allocate a libgit2-owned buffer big enough for aContent and copy the bytes plus a trailing NUL.
bool TryTrivialMerge(const MERGE_BLOBS &aBlobs, git_buf *aResult, int *aRc)
Resolve the trivial 3-way cases (identical sides, or one side unchanged from the ancestor).
int LoadMergeBlobs(const git_merge_driver_source *aSource, MERGE_BLOBS &aBlobs)
Look up the ancestor/ours/theirs blobs of a merge-driver source and decode them into aBlobs.
int ApplyMergeDriver(const git_merge_driver_source *aSrc, const char **aPathOut, unsigned int *aModeOut, git_buf *aMergedOut)
Shared libgit2 merge-driver apply callback shim.
Decoded ancestor/ours/theirs blob contents for a 3-way merge driver.