summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c8f1444)
raw | patch | inline | side by side (parent: c8f1444)
author | Ramsay Jones <ramsay@ramsay1.demon.co.uk> | |
Thu, 7 Apr 2011 18:31:24 +0000 (19:31 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 11 Apr 2011 17:35:25 +0000 (10:35 -0700) |
In order to fix the warning, we add a new "merge-file.h" header
containing the extern declaration of the merge_file() function,
and include the header in the source files that require the
declaration.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
containing the extern declaration of the merge_file() function,
and include the header in the source files that require the
declaration.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile | patch | blob | history | |
builtin/merge-tree.c | patch | blob | history | |
merge-file.c | patch | blob | history | |
merge-file.h | [new file with mode: 0644] | patch | blob |
diff --git a/Makefile b/Makefile
index a21f60e893053f9a520b7266abceb7a69cc0aa0e..385193acc5f71a9a3529868b6caac3e3a25faa11 100644 (file)
--- a/Makefile
+++ b/Makefile
LIB_H += ll-merge.h
LIB_H += log-tree.h
LIB_H += mailmap.h
+LIB_H += merge-file.h
LIB_H += merge-recursive.h
LIB_H += notes.h
LIB_H += notes-cache.h
diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c
index 19917426fba19cf60b838ff9b07d20b5e44259a5..897a563bc6662e108c29656d633b7400384154f9 100644 (file)
--- a/builtin/merge-tree.c
+++ b/builtin/merge-tree.c
#include "xdiff-interface.h"
#include "blob.h"
#include "exec_cmd.h"
+#include "merge-file.h"
static const char merge_tree_usage[] = "git merge-tree <base-tree> <branch1> <branch2>";
static int resolve_directories = 1;
return "removed in remote";
}
-extern void *merge_file(const char *, struct blob *, struct blob *, struct blob *, unsigned long *);
-
static void *result(struct merge_list *entry, unsigned long *size)
{
enum object_type type;
diff --git a/merge-file.c b/merge-file.c
index f7f4533926e35867725db00f0c89522c4b290898..7845528e88eea6a42f914b5bf596473eb33dea40 100644 (file)
--- a/merge-file.c
+++ b/merge-file.c
#include "xdiff-interface.h"
#include "ll-merge.h"
#include "blob.h"
+#include "merge-file.h"
static int fill_mmfile_blob(mmfile_t *f, struct blob *obj)
{
diff --git a/merge-file.h b/merge-file.h
--- /dev/null
+++ b/merge-file.h
@@ -0,0 +1,7 @@
+#ifndef MERGE_FILE_H
+#define MERGE_FILE_H
+
+extern void *merge_file(const char *path, struct blob *base, struct blob *our,
+ struct blob *their, unsigned long *size);
+
+#endif