Git development
 help / color / mirror / Atom feed
From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
To: Junio C Hamano <junkio@cox.net>
Cc: GIT Mailing-list <git@vger.kernel.org>
Subject: [RFC][PATCH 07/10] Sparse: fix "'merge_file' not declared" warning
Date: Fri, 08 Jun 2007 23:22:51 +0100	[thread overview]
Message-ID: <4669D6BB.9060900@ramsay1.demon.co.uk> (raw)


Add a declaration for merge_file() to a new "merge-file.h" header
file, and add the appropriate include directives.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---

There are two other (static) definitions of a merge_file() function,
one in merge-recursive.c, which could probably be renamed merge_filespec()
and one in merge-index.c, which could be renamed merge_path().
Maybe the the function in merge-file.c should be called merge_blob() ...
(and then change the file names too!)

 Makefile     |    3 ++-
 merge-file.c |    1 +
 merge-file.h |    8 ++++++++
 merge-tree.c |    3 +--
 4 files changed, 12 insertions(+), 3 deletions(-)
 create mode 100644 merge-file.h

diff --git a/Makefile b/Makefile
index 29243c6..19b6da1 100644
--- a/Makefile
+++ b/Makefile
@@ -296,7 +296,8 @@ LIB_H = \
 	diff.h object.h pack.h pkt-line.h quote.h refs.h list-objects.h sideband.h \
 	run-command.h strbuf.h tag.h tree.h git-compat-util.h revision.h \
 	tree-walk.h log-tree.h dir.h path-list.h unpack-trees.h builtin.h \
-	utf8.h reflog-walk.h patch-ids.h attr.h decorate.h progress.h mailmap.h
+	utf8.h reflog-walk.h patch-ids.h attr.h decorate.h progress.h \
+	mailmap.h merge-file.h
 
 DIFF_OBJS = \
 	diff.o diff-lib.o diffcore-break.o diffcore-order.o \
diff --git a/merge-file.c b/merge-file.c
index 748d15c..7bfefe7 100644
--- a/merge-file.c
+++ b/merge-file.c
@@ -2,6 +2,7 @@
 #include "run-command.h"
 #include "xdiff-interface.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
new file mode 100644
index 0000000..a503c90
--- /dev/null
+++ b/merge-file.h
@@ -0,0 +1,8 @@
+#ifndef MERGE_FILE_H
+#define MERGE_FILE_H
+
+#include "blob.h"
+
+extern void *merge_file(struct blob *, struct blob *, struct blob *, unsigned long *);
+
+#endif
diff --git a/merge-tree.c b/merge-tree.c
index 3b8d9e6..93c8f54 100644
--- a/merge-tree.c
+++ b/merge-tree.c
@@ -2,6 +2,7 @@
 #include "tree-walk.h"
 #include "xdiff-interface.h"
 #include "blob.h"
+#include "merge-file.h"
 
 static const char merge_tree_usage[] = "git-merge-tree <base-tree> <branch1> <branch2>";
 static int resolve_directories = 1;
@@ -53,8 +54,6 @@ static const char *explanation(struct merge_list *entry)
 	return "removed in remote";
 }
 
-extern void *merge_file(struct blob *, struct blob *, struct blob *, unsigned long *);
-
 static void *result(struct merge_list *entry, unsigned long *size)
 {
 	enum object_type type;
-- 
1.5.2

                 reply	other threads:[~2007-06-08 23:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4669D6BB.9060900@ramsay1.demon.co.uk \
    --to=ramsay@ramsay1.demon.co.uk \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox