Unidiff1 files changed, 2 insertions, 1 deletions
|
diff --git a/shared.c b/shared.c index 1cd60a2..343a4f9 100644 --- a/ shared.c+++ b/ shared.c |
|
@@ -299,25 +299,26 @@ void cgit_diff_tree_cb(struct diff_queue_struct *q, |
299 | ((filepair_fn)data)(q->queue[i]); |
299 | ((filepair_fn)data)(q->queue[i]); |
300 | } |
300 | } |
301 | } |
301 | } |
302 | |
302 | |
303 | static int load_mmfile(mmfile_t *file, const unsigned char *sha1) |
303 | static int load_mmfile(mmfile_t *file, const unsigned char *sha1) |
304 | { |
304 | { |
305 | enum object_type type; |
305 | enum object_type type; |
306 | |
306 | |
307 | if (is_null_sha1(sha1)) { |
307 | if (is_null_sha1(sha1)) { |
308 | file->ptr = (char *)""; |
308 | file->ptr = (char *)""; |
309 | file->size = 0; |
309 | file->size = 0; |
310 | } else { |
310 | } else { |
311 | file->ptr = read_sha1_file(sha1, &type, &file->size); |
311 | file->ptr = read_sha1_file(sha1, &type, |
| |
312 | (unsigned long *)&file->size); |
312 | } |
313 | } |
313 | return 1; |
314 | return 1; |
314 | } |
315 | } |
315 | |
316 | |
316 | /* |
317 | /* |
317 | * Receive diff-buffers from xdiff and concatenate them as |
318 | * Receive diff-buffers from xdiff and concatenate them as |
318 | * needed across multiple callbacks. |
319 | * needed across multiple callbacks. |
319 | * |
320 | * |
320 | * This is basically a copy of xdiff-interface.c/xdiff_outf(), |
321 | * This is basically a copy of xdiff-interface.c/xdiff_outf(), |
321 | * ripped from git and modified to use globals instead of |
322 | * ripped from git and modified to use globals instead of |
322 | * a special callback-struct. |
323 | * a special callback-struct. |
323 | */ |
324 | */ |
|