aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Keeping2015-08-12 15:34:48 +0100
committerJason A. Donenfeld2015-08-12 16:57:30 +0200
commit044e2d26da4f8b4f9ff25e4a729ab4e393073b5e (patch)
treeb98bb6979764625c4f919e90e3374f91b698dea4
parent2d386e227e0b75474efcfe82e9fec7d0f21c6df4 (diff)
downloadcgit-044e2d26da4f8b4f9ff25e4a729ab4e393073b5e.tar.gz
cgit-044e2d26da4f8b4f9ff25e4a729ab4e393073b5e.tar.bz2
cgit-044e2d26da4f8b4f9ff25e4a729ab4e393073b5e.zip
shared: make cgit_diff_tree_cb public
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@keeping.me.uk>
-rw-r--r--cgit.h3
-rw-r--r--shared.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/cgit.h b/cgit.h
index db9a8eb..b2253d2 100644
--- a/cgit.h
+++ b/cgit.h
@@ -340,6 +340,9 @@ extern int cgit_refs_cb(const char *refname, const struct object_id *oid,
340 340
341extern void *cgit_free_commitinfo(struct commitinfo *info); 341extern void *cgit_free_commitinfo(struct commitinfo *info);
342 342
343void cgit_diff_tree_cb(struct diff_queue_struct *q,
344 struct diff_options *options, void *data);
345
343extern int cgit_diff_files(const unsigned char *old_sha1, 346extern int cgit_diff_files(const unsigned char *old_sha1,
344 const unsigned char *new_sha1, 347 const unsigned char *new_sha1,
345 unsigned long *old_size, unsigned long *new_size, 348 unsigned long *old_size, unsigned long *new_size,
diff --git a/shared.c b/shared.c
index a83afcb..0431b59 100644
--- a/shared.c
+++ b/shared.c
@@ -250,8 +250,8 @@ int cgit_refs_cb(const char *refname, const struct object_id *oid, int flags,
250 return 0; 250 return 0;
251} 251}
252 252
253static void cgit_diff_tree_cb(struct diff_queue_struct *q, 253void cgit_diff_tree_cb(struct diff_queue_struct *q,
254 struct diff_options *options, void *data) 254 struct diff_options *options, void *data)
255{ 255{
256 int i; 256 int i;
257 257