diff options
Diffstat (limited to 'ui_70-diff.c')
-rw-r--r-- | ui_70-diff.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/ui_70-diff.c b/ui_70-diff.c index 999c629..46e729d 100644 --- a/ui_70-diff.c +++ b/ui_70-diff.c @@ -381,9 +381,21 @@ void cgit_print_diff_ctrls(void) html("</div>"); } -typedef struct strbuf* cgit_gopher_add_info_tag(struct diff_options *opt, void *data){ +struct strbuf* cgit_gopher_add_info_tag(struct diff_options *opt, void *data){ + struct strbuf* buff; + char *str; + + + buff = malloc(sizeof(struct strbuf)); + str = malloc(2 * sizeof(char)); + str[0]= 'i'; + str[1]= '\0'; + strbuf_init(buff, 2); + strbuf_attach(buff, str, 2, 2); + + return buff; } @@ -448,6 +460,7 @@ void cgit_print_diff(const char *new_rev, const char *old_rev, diff_setup(&diffopt); diffopt.output_format = DIFF_FORMAT_PATCH; + /*diffopt.output_format = DIFF_FORMAT_RAW;*/ diffopt.flags.recursive = 1; diffopt.output_prefix=cgit_gopher_add_info_tag; diff_setup_done(&diffopt); |