diff options
| author | Calin Seciu <[email protected]> | 2016-02-20 14:52:57 +0200 |
|---|---|---|
| committer | Calin Seciu <[email protected]> | 2016-02-20 14:52:57 +0200 |
| commit | c6f394e407a8f119eea191e1321f61828921f164 (patch) | |
| tree | 6b4ab4bbd263388f0384b029b2a770189782b9d0 /wrapper.c | |
| parent | dc4409793db0205ce7c0783a10363d7d67aee674 (diff) | |
| parent | 251d89e1d41037185df0ea89e9aab208efc40d4e (diff) | |
Merge branch 'next' into stash-support
Diffstat (limited to 'wrapper.c')
| -rw-r--r-- | wrapper.c | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -141,6 +141,29 @@ int _go_git_tag_foreach(git_repository *repo, void *payload) return git_tag_foreach(repo, (git_tag_foreach_cb)&gitTagForeachCb, payload); } +int _go_git_merge_file(git_merge_file_result* out, char* ancestorContents, size_t ancestorLen, char* ancestorPath, unsigned int ancestorMode, char* oursContents, size_t oursLen, char* oursPath, unsigned int oursMode, char* theirsContents, size_t theirsLen, char* theirsPath, unsigned int theirsMode, git_merge_file_options* copts) { + git_merge_file_input ancestor = GIT_MERGE_FILE_INPUT_INIT; + git_merge_file_input ours = GIT_MERGE_FILE_INPUT_INIT; + git_merge_file_input theirs = GIT_MERGE_FILE_INPUT_INIT; + + ancestor.ptr = ancestorContents; + ancestor.size = ancestorLen; + ancestor.path = ancestorPath; + ancestor.mode = ancestorMode; + + ours.ptr = oursContents; + ours.size = oursLen; + ours.path = oursPath; + ours.mode = oursMode; + + theirs.ptr = theirsContents; + theirs.size = theirsLen; + theirs.path = theirsPath; + theirs.mode = theirsMode; + + return git_merge_file(out, &ancestor, &ours, &theirs, copts); +} + void _go_git_setup_stash_apply_progress_callbacks(git_stash_apply_options *opts) { opts->progress_cb = (git_stash_apply_progress_cb)stashApplyProgressCb; } |
