]>
git.ipfire.org Git - thirdparty/git.git/blob - interdiff.c
6 static struct strbuf
*idiff_prefix_cb(struct diff_options
*opt
, void *data
)
11 void show_interdiff(struct rev_info
*rev
, int indent
)
13 struct diff_options opts
;
14 struct strbuf prefix
= STRBUF_INIT
;
16 memcpy(&opts
, &rev
->diffopt
, sizeof(opts
));
17 opts
.output_format
= DIFF_FORMAT_PATCH
;
18 opts
.output_prefix
= idiff_prefix_cb
;
19 strbuf_addchars(&prefix
, ' ', indent
);
20 opts
.output_prefix_data
= &prefix
;
21 diff_setup_done(&opts
);
23 diff_tree_oid(rev
->idiff_oid1
, rev
->idiff_oid2
, "", &opts
);
27 strbuf_release(&prefix
);