diff options
Diffstat (limited to 'shared.c')
| -rw-r--r-- | shared.c | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -307,7 +307,7 @@ void cgit_diff_tree(const unsigned char *old_sha1, | |||
| 307 | filepair_fn fn, const char *prefix, int ignorews) | 307 | filepair_fn fn, const char *prefix, int ignorews) |
| 308 | { | 308 | { |
| 309 | struct diff_options opt; | 309 | struct diff_options opt; |
| 310 | int prefixlen; | 310 | struct pathspec_item item; |
| 311 | 311 | ||
| 312 | diff_setup(&opt); | 312 | diff_setup(&opt); |
| 313 | opt.output_format = DIFF_FORMAT_CALLBACK; | 313 | opt.output_format = DIFF_FORMAT_CALLBACK; |
| @@ -319,10 +319,10 @@ void cgit_diff_tree(const unsigned char *old_sha1, | |||
| 319 | opt.format_callback = cgit_diff_tree_cb; | 319 | opt.format_callback = cgit_diff_tree_cb; |
| 320 | opt.format_callback_data = fn; | 320 | opt.format_callback_data = fn; |
| 321 | if (prefix) { | 321 | if (prefix) { |
| 322 | opt.nr_paths = 1; | 322 | item.match = prefix; |
| 323 | opt.paths = &prefix; | 323 | item.len = strlen(prefix); |
| 324 | prefixlen = strlen(prefix); | 324 | opt.pathspec.nr = 1; |
| 325 | opt.pathlens = &prefixlen; | 325 | opt.pathspec.items = &item; |
| 326 | } | 326 | } |
| 327 | diff_setup_done(&opt); | 327 | diff_setup_done(&opt); |
| 328 | 328 | ||
