SHA256
1
0
forked from pool/git
git/cgit-git-1.7.5.x-build-fix.diff

44 lines
1000 B
Diff
Raw Normal View History

---
shared.c | 11 ++++++-----
ui-stats.c | 2 +-
2 files changed, 7 insertions(+), 6 deletions(-)
--- a/shared.c
+++ b/shared.c
@@ -312,7 +312,7 @@
{
struct diff_options opt;
int ret;
- int prefixlen;
+ struct pathspec_item pitem;
diff_setup(&opt);
opt.output_format = DIFF_FORMAT_CALLBACK;
@@ -324,10 +324,11 @@
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);
--- a/ui-stats.c
+++ b/ui-stats.c
@@ -239,7 +239,7 @@
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);