You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
2.1 KiB
79 lines
2.1 KiB
Index: Makefile |
|
--- Makefile.orig 2011-07-21 16:24:10.000000000 +0200 |
|
+++ Makefile 2011-08-10 22:56:40.000000000 +0200 |
|
@@ -158,10 +158,10 @@ |
|
EXTLIBS += -lcrypto |
|
endif |
|
|
|
-cgit: $(OBJECTS) libgit |
|
+cgit: $(OBJECTS) |
|
$(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o cgit $(OBJECTS) $(EXTLIBS) |
|
|
|
-cgit.o: VERSION |
|
+cgit.o: cgit.c VERSION |
|
|
|
ifneq "$(MAKECMDGOALS)" "clean" |
|
-include $(OBJECTS:.o=.d) |
|
Index: shared.c |
|
--- shared.c.orig 2011-07-21 16:24:10.000000000 +0200 |
|
+++ shared.c 2011-08-10 22:55:23.000000000 +0200 |
|
@@ -303,7 +303,7 @@ |
|
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 @@ |
|
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: ui-stats.c |
|
--- ui-stats.c.orig 2011-07-21 16:24:10.000000000 +0200 |
|
+++ ui-stats.c 2011-08-10 22:55:34.000000000 +0200 |
|
@@ -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); |
|
Index: ui-tree.c |
|
--- ui-tree.c.orig 2011-07-21 16:24:10.000000000 +0200 |
|
+++ ui-tree.c 2011-08-10 22:56:23.000000000 +0200 |
|
@@ -206,6 +206,8 @@ |
|
|
|
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 @@ |
|
} |
|
|
|
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(); |
|
} |
|
|
|
|