aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
m---------git0
-rw-r--r--ui-atom.c2
-rw-r--r--ui-blame.c4
-rw-r--r--ui-blob.c9
-rw-r--r--ui-log.c4
-rw-r--r--ui-plain.c3
-rw-r--r--ui-stats.c2
-rw-r--r--ui-tree.c10
9 files changed, 21 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index e690c7f..40f4fd8 100644
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ htmldir = $(docdir)
14pdfdir = $(docdir) 14pdfdir = $(docdir)
15mandir = $(prefix)/share/man 15mandir = $(prefix)/share/man
16SHA1_HEADER = <openssl/sha.h> 16SHA1_HEADER = <openssl/sha.h>
17GIT_VER = 2.20.0 17GIT_VER = 2.21.0
18GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz 18GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz
19INSTALL = install 19INSTALL = install
20COPYTREE = cp -r 20COPYTREE = cp -r
diff --git a/git b/git
Subproject 5d826e972970a784bd7a7bdf587512510097b8c Subproject 8104ec994ea3849a968b4667d072fedd1e68864
diff --git a/ui-atom.c b/ui-atom.c
index cd66f82..1056f36 100644
--- a/ui-atom.c
+++ b/ui-atom.c
@@ -140,7 +140,7 @@ void cgit_print_atom(char *tip, const char *path, int max_count)
140 } 140 }
141 while ((commit = get_revision(&rev)) != NULL) { 141 while ((commit = get_revision(&rev)) != NULL) {
142 add_entry(commit, host); 142 add_entry(commit, host);
143 free_commit_buffer(commit); 143 free_commit_buffer(the_repository->parsed_objects, commit);
144 free_commit_list(commit->parents); 144 free_commit_list(commit->parents);
145 commit->parents = NULL; 145 commit->parents = NULL;
146 } 146 }
diff --git a/ui-blame.c b/ui-blame.c
index c52cb9b..644c30a 100644
--- a/ui-blame.c
+++ b/ui-blame.c
@@ -290,8 +290,8 @@ void cgit_print_blame(void)
290 walk_tree_ctx.match_baselen = (path_items.match) ? 290 walk_tree_ctx.match_baselen = (path_items.match) ?
291 basedir_len(path_items.match) : -1; 291 basedir_len(path_items.match) : -1;
292 292
293 read_tree_recursive(commit->maybe_tree, "", 0, 0, &paths, walk_tree, 293 read_tree_recursive(the_repository, commit->maybe_tree, "", 0, 0,
294 &walk_tree_ctx); 294 &paths, walk_tree, &walk_tree_ctx);
295 if (!walk_tree_ctx.state) 295 if (!walk_tree_ctx.state)
296 cgit_print_error_page(404, "Not found", "Not found"); 296 cgit_print_error_page(404, "Not found", "Not found");
297 else if (walk_tree_ctx.state == 2) 297 else if (walk_tree_ctx.state == 2)
diff --git a/ui-blob.c b/ui-blob.c
index 4b6b462..30e2d4b 100644
--- a/ui-blob.c
+++ b/ui-blob.c
@@ -56,7 +56,8 @@ int cgit_ref_path_exists(const char *path, const char *ref, int file_only)
56 goto done; 56 goto done;
57 if (oid_object_info(the_repository, &oid, &size) != OBJ_COMMIT) 57 if (oid_object_info(the_repository, &oid, &size) != OBJ_COMMIT)
58 goto done; 58 goto done;
59 read_tree_recursive(lookup_commit_reference(the_repository, &oid)->maybe_tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx); 59 read_tree_recursive(the_repository, lookup_commit_reference(the_repository, &oid)->maybe_tree,
60 "", 0, 0, &paths, walk_tree, &walk_tree_ctx);
60 61
61done: 62done:
62 free(path_items.match); 63 free(path_items.match);
@@ -90,7 +91,8 @@ int cgit_print_file(char *path, const char *head, int file_only)
90 type = oid_object_info(the_repository, &oid, &size); 91 type = oid_object_info(the_repository, &oid, &size);
91 if (type == OBJ_COMMIT) { 92 if (type == OBJ_COMMIT) {
92 commit = lookup_commit_reference(the_repository, &oid); 93 commit = lookup_commit_reference(the_repository, &oid);
93 read_tree_recursive(commit->maybe_tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx); 94 read_tree_recursive(the_repository, commit->maybe_tree,
95 "", 0, 0, &paths, walk_tree, &walk_tree_ctx);
94 if (!walk_tree_ctx.found_path) 96 if (!walk_tree_ctx.found_path)
95 return -1; 97 return -1;
96 type = oid_object_info(the_repository, &oid, &size); 98 type = oid_object_info(the_repository, &oid, &size);
@@ -146,7 +148,8 @@ void cgit_print_blob(const char *hex, char *path, const char *head, int file_onl
146 148
147 if ((!hex) && type == OBJ_COMMIT && path) { 149 if ((!hex) && type == OBJ_COMMIT && path) {
148 commit = lookup_commit_reference(the_repository, &oid); 150 commit = lookup_commit_reference(the_repository, &oid);
149 read_tree_recursive(commit->maybe_tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx); 151 read_tree_recursive(the_repository, commit->maybe_tree,
152 "", 0, 0, &paths, walk_tree, &walk_tree_ctx);
150 type = oid_object_info(the_repository, &oid, &size); 153 type = oid_object_info(the_repository, &oid, &size);
151 } 154 }
152 155
diff --git a/ui-log.c b/ui-log.c
index 8c65425..dc5cb1e 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -488,7 +488,7 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
488 for (i = 0; i < ofs && (commit = get_revision(&rev)) != NULL; /* nop */) { 488 for (i = 0; i < ofs && (commit = get_revision(&rev)) != NULL; /* nop */) {
489 if (show_commit(commit, &rev)) 489 if (show_commit(commit, &rev))
490 i++; 490 i++;
491 free_commit_buffer(commit); 491 free_commit_buffer(the_repository->parsed_objects, commit);
492 free_commit_list(commit->parents); 492 free_commit_list(commit->parents);
493 commit->parents = NULL; 493 commit->parents = NULL;
494 } 494 }
@@ -510,7 +510,7 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
510 i++; 510 i++;
511 print_commit(commit, &rev); 511 print_commit(commit, &rev);
512 } 512 }
513 free_commit_buffer(commit); 513 free_commit_buffer(the_repository->parsed_objects, commit);
514 free_commit_list(commit->parents); 514 free_commit_list(commit->parents);
515 commit->parents = NULL; 515 commit->parents = NULL;
516 } 516 }
diff --git a/ui-plain.c b/ui-plain.c
index 070c34b..b73c1cf 100644
--- a/ui-plain.c
+++ b/ui-plain.c
@@ -198,7 +198,8 @@ void cgit_print_plain(void)
198 } 198 }
199 else 199 else
200 walk_tree_ctx.match_baselen = basedir_len(path_items.match); 200 walk_tree_ctx.match_baselen = basedir_len(path_items.match);
201 read_tree_recursive(commit->maybe_tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx); 201 read_tree_recursive(the_repository, commit->maybe_tree,
202 "", 0, 0, &paths, walk_tree, &walk_tree_ctx);
202 if (!walk_tree_ctx.match) 203 if (!walk_tree_ctx.match)
203 cgit_print_error_page(404, "Not found", "Not found"); 204 cgit_print_error_page(404, "Not found", "Not found");
204 else if (walk_tree_ctx.match == 2) 205 else if (walk_tree_ctx.match == 2)
diff --git a/ui-stats.c b/ui-stats.c
index 7acd358..7272a61 100644
--- a/ui-stats.c
+++ b/ui-stats.c
@@ -241,7 +241,7 @@ static struct string_list collect_stats(const struct cgit_period *period)
241 memset(&authors, 0, sizeof(authors)); 241 memset(&authors, 0, sizeof(authors));
242 while ((commit = get_revision(&rev)) != NULL) { 242 while ((commit = get_revision(&rev)) != NULL) {
243 add_commit(&authors, commit, period); 243 add_commit(&authors, commit, period);
244 free_commit_buffer(commit); 244 free_commit_buffer(the_repository->parsed_objects, commit);
245 free_commit_list(commit->parents); 245 free_commit_list(commit->parents);
246 commit->parents = NULL; 246 commit->parents = NULL;
247 } 247 }
diff --git a/ui-tree.c b/ui-tree.c
index 314ac52..4be89c8 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -185,8 +185,8 @@ static void write_tree_link(const struct object_id *oid, char *name,
185 tree_ctx.name = NULL; 185 tree_ctx.name = NULL;
186 tree_ctx.count = 0; 186 tree_ctx.count = 0;
187 187
188 read_tree_recursive(tree, "", 0, 1, &paths, single_tree_cb, 188 read_tree_recursive(the_repository, tree, "", 0, 1,
189 &tree_ctx); 189 &paths, single_tree_cb, &tree_ctx);
190 190
191 if (tree_ctx.count != 1) 191 if (tree_ctx.count != 1)
192 break; 192 break;
@@ -294,7 +294,8 @@ static void ls_tree(const struct object_id *oid, const char *path, struct walk_t
294 } 294 }
295 295
296 ls_head(); 296 ls_head();
297 read_tree_recursive(tree, "", 0, 1, &paths, ls_item, walk_tree_ctx); 297 read_tree_recursive(the_repository, tree, "", 0, 1,
298 &paths, ls_item, walk_tree_ctx);
298 ls_tail(); 299 ls_tail();
299} 300}
300 301
@@ -373,7 +374,8 @@ void cgit_print_tree(const char *rev, char *path)
373 goto cleanup; 374 goto cleanup;
374 } 375 }
375 376
376 read_tree_recursive(commit->maybe_tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx); 377 read_tree_recursive(the_repository, commit->maybe_tree, "", 0, 0,
378 &paths, walk_tree, &walk_tree_ctx);
377 if (walk_tree_ctx.state == 1) 379 if (walk_tree_ctx.state == 1)
378 ls_tail(); 380 ls_tail();
379 else if (walk_tree_ctx.state == 2) 381 else if (walk_tree_ctx.state == 2)