summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/git2/sys/merge.h2
-rw-r--r--src/merge.c2
-rw-r--r--src/merge_driver.c4
-rw-r--r--src/merge_driver.h2
-rw-r--r--tests/merge/driver.c14
5 files changed, 12 insertions, 12 deletions
diff --git a/include/git2/sys/merge.h b/include/git2/sys/merge.h
index ef4bc5aca..ee5fb5c73 100644
--- a/include/git2/sys/merge.h
+++ b/include/git2/sys/merge.h
@@ -109,7 +109,7 @@ typedef int GIT_CALLBACK(git_merge_driver_apply_fn)(
git_merge_driver *self,
const char **path_out,
uint32_t *mode_out,
- git_buf *merged_out,
+ git_userbuf *merged_out,
const char *filter_name,
const git_merge_driver_source *src);
diff --git a/src/merge.c b/src/merge.c
index afe69e564..a27296f73 100644
--- a/src/merge.c
+++ b/src/merge.c
@@ -876,7 +876,7 @@ static int merge_conflict_invoke_driver(
*out = NULL;
- if ((error = driver->apply(driver, &path, &mode, &buf, name, src)) < 0 ||
+ if ((error = driver->apply(driver, &path, &mode, (git_userbuf *)&buf, name, src)) < 0 ||
(error = git_repository_odb(&odb, src->repo)) < 0 ||
(error = git_odb_write(&oid, odb, buf.ptr, buf.size, GIT_OBJECT_BLOB)) < 0)
goto done;
diff --git a/src/merge_driver.c b/src/merge_driver.c
index 666349b15..021f6227d 100644
--- a/src/merge_driver.c
+++ b/src/merge_driver.c
@@ -66,7 +66,7 @@ int git_merge_driver__builtin_apply(
git_merge_driver *self,
const char **path_out,
uint32_t *mode_out,
- git_buf *merged_out,
+ git_userbuf *merged_out,
const char *filter_name,
const git_merge_driver_source *src)
{
@@ -117,7 +117,7 @@ static int merge_driver_binary_apply(
git_merge_driver *self,
const char **path_out,
uint32_t *mode_out,
- git_buf *merged_out,
+ git_userbuf *merged_out,
const char *filter_name,
const git_merge_driver_source *src)
{
diff --git a/src/merge_driver.h b/src/merge_driver.h
index 6b7da5287..4ebd22d6d 100644
--- a/src/merge_driver.h
+++ b/src/merge_driver.h
@@ -46,7 +46,7 @@ extern int git_merge_driver__builtin_apply(
git_merge_driver *self,
const char **path_out,
uint32_t *mode_out,
- git_buf *merged_out,
+ git_userbuf *merged_out,
const char *filter_name,
const git_merge_driver_source *src);
diff --git a/tests/merge/driver.c b/tests/merge/driver.c
index a3fececb4..3d35f07da 100644
--- a/tests/merge/driver.c
+++ b/tests/merge/driver.c
@@ -67,7 +67,7 @@ static int test_driver_apply(
git_merge_driver *s,
const char **path_out,
uint32_t *mode_out,
- git_buf *merged_out,
+ git_userbuf *merged_out,
const char *filter_name,
const git_merge_driver_source *src)
{
@@ -77,8 +77,8 @@ static int test_driver_apply(
*path_out = "applied.txt";
*mode_out = GIT_FILEMODE_BLOB;
- return git_buf_printf(merged_out, "This is the `%s` driver.\n",
- filter_name);
+ return git_buf_printf((git_buf *)merged_out,
+ "This is the `%s` driver.\n", filter_name);
}
static struct test_merge_driver test_driver_custom = {
@@ -172,11 +172,11 @@ void test_merge_driver__shutdown_is_called(void)
test_driver_custom.shutdown = 0;
test_driver_wildcard.initialized = 0;
test_driver_wildcard.shutdown = 0;
-
+
/* run the merge with the custom driver */
set_gitattributes_to("custom");
merge_branch();
-
+
/* unregister the drivers, ensure their shutdown function is called */
test_drivers_unregister();
@@ -196,7 +196,7 @@ static int defer_driver_apply(
git_merge_driver *s,
const char **path_out,
uint32_t *mode_out,
- git_buf *merged_out,
+ git_userbuf *merged_out,
const char *filter_name,
const git_merge_driver_source *src)
{
@@ -241,7 +241,7 @@ static int conflict_driver_apply(
git_merge_driver *s,
const char **path_out,
uint32_t *mode_out,
- git_buf *merged_out,
+ git_userbuf *merged_out,
const char *filter_name,
const git_merge_driver_source *src)
{