summaryrefslogtreecommitdiff
path: root/ui_70-diff.c
diff options
context:
space:
mode:
authorKatolaZ <katolaz@freaknet.org>2018-07-29 06:16:42 +0100
committerKatolaZ <katolaz@freaknet.org>2018-07-29 06:16:42 +0100
commit09dc60b4d73f290ccad37a086a6f867fe11efa44 (patch)
tree58bc1c5d752fec9a9f3bd590da1602e1d79d5093 /ui_70-diff.c
parent21a23a12ffa5513248eecc5444dc396c5ba0b443 (diff)
patch and plain diff works
Diffstat (limited to 'ui_70-diff.c')
-rw-r--r--ui_70-diff.c15
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);