--- shared.c | 11 ++++++----- ui-stats.c | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) Index: cgit-0.9.0.2/shared.c =================================================================== --- cgit-0.9.0.2.orig/shared.c 2011-07-21 16:24:10.000000000 +0200 +++ cgit-0.9.0.2/shared.c 2011-08-04 01:20:42.695017536 +0200 @@ -303,7 +303,7 @@ void cgit_diff_tree(const unsigned char filepair_fn fn, const char *prefix, int ignorews) { struct diff_options opt; - int prefixlen; + struct pathspec_item pitem; diff_setup(&opt); opt.output_format = DIFF_FORMAT_CALLBACK; @@ -315,10 +315,11 @@ void cgit_diff_tree(const unsigned char opt.format_callback = cgit_diff_tree_cb; opt.format_callback_data = fn; if (prefix) { - opt.nr_paths = 1; - opt.paths = &prefix; - prefixlen = strlen(prefix); - opt.pathlens = &prefixlen; + opt.pathspec.nr = 1; + opt.pathspec.raw = &prefix; + pitem.match = prefix; + pitem.len = strlen(prefix); + opt.pathspec.items = &pitem; } diff_setup_done(&opt); Index: cgit-0.9.0.2/ui-stats.c =================================================================== --- cgit-0.9.0.2.orig/ui-stats.c 2011-07-21 16:24:10.000000000 +0200 +++ cgit-0.9.0.2/ui-stats.c 2011-08-04 01:20:42.695017536 +0200 @@ -239,7 +239,7 @@ struct string_list collect_stats(struct init_revisions(&rev, NULL); rev.abbrev = DEFAULT_ABBREV; rev.commit_format = CMIT_FMT_DEFAULT; - rev.no_merges = 1; + rev.max_parents = 1; rev.verbose_header = 1; rev.show_root_diff = 0; setup_revisions(argc, argv, &rev, NULL); Index: cgit-0.9.0.2/ui-tree.c =================================================================== --- cgit-0.9.0.2.orig/ui-tree.c 2011-07-21 16:24:10.000000000 +0200 +++ cgit-0.9.0.2/ui-tree.c 2011-08-04 01:20:58.632061214 +0200 @@ -206,6 +206,8 @@ static void ls_tail() static void ls_tree(const unsigned char *sha1, char *path) { + const char *paths[] = { path, NULL }; + struct pathspec pathspec; struct tree *tree; tree = parse_tree_indirect(sha1); @@ -216,7 +218,9 @@ static void ls_tree(const unsigned char } ls_head(); - read_tree_recursive(tree, "", 0, 1, NULL, ls_item, NULL); + init_pathspec(&pathspec, paths); + read_tree_recursive(tree, "", 0, 1, &pathspec, ls_item, NULL); + free_pathspec(&pathspec); ls_tail(); }