[PATCH v2 1/2] shared: make cgit_diff_tree_cb public

John Keeping john at keeping.me.uk
Sat Apr 20 12:14:36 CEST 2013


This will allow us to use this nice wrapper function elsewhere, avoiding
dealing with the diff queue when we only need to inspect a filepair.

Signed-off-by: John Keeping <john at keeping.me.uk>
---
 cgit.h   | 3 +++
 shared.c | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/cgit.h b/cgit.h
index 850b792..b56e756 100644
--- a/cgit.h
+++ b/cgit.h
@@ -315,6 +315,9 @@ extern int cgit_refs_cb(const char *refname, const unsigned char *sha1,
 
 extern void *cgit_free_commitinfo(struct commitinfo *info);
 
+void cgit_diff_tree_cb(struct diff_queue_struct *q,
+		       struct diff_options *options, void *data);
+
 extern int cgit_diff_files(const unsigned char *old_sha1,
 			   const unsigned char *new_sha1,
 			   unsigned long *old_size, unsigned long *new_size,
diff --git a/shared.c b/shared.c
index 4369378..4a73ee6 100644
--- a/shared.c
+++ b/shared.c
@@ -245,8 +245,8 @@ int cgit_refs_cb(const char *refname, const unsigned char *sha1, int flags,
 	return 0;
 }
 
-static void cgit_diff_tree_cb(struct diff_queue_struct *q,
-			      struct diff_options *options, void *data)
+void cgit_diff_tree_cb(struct diff_queue_struct *q,
+		       struct diff_options *options, void *data)
 {
 	int i;
 
-- 
1.8.2.1.715.gb260f47





More information about the CGit mailing list