diff options
| -rw-r--r-- | Makefile | 2 | ||||
| m--------- | git | 0 | ||||
| -rw-r--r-- | ui-atom.c | 2 | ||||
| -rw-r--r-- | ui-blame.c | 4 | ||||
| -rw-r--r-- | ui-blob.c | 9 | ||||
| -rw-r--r-- | ui-log.c | 4 | ||||
| -rw-r--r-- | ui-plain.c | 3 | ||||
| -rw-r--r-- | ui-stats.c | 2 | ||||
| -rw-r--r-- | ui-tree.c | 10 |
9 files changed, 21 insertions, 15 deletions
| @@ -14,7 +14,7 @@ htmldir = $(docdir) | |||
| 14 | pdfdir = $(docdir) | 14 | pdfdir = $(docdir) |
| 15 | mandir = $(prefix)/share/man | 15 | mandir = $(prefix)/share/man |
| 16 | SHA1_HEADER = <openssl/sha.h> | 16 | SHA1_HEADER = <openssl/sha.h> |
| 17 | GIT_VER = 2.20.0 | 17 | GIT_VER = 2.21.0 |
| 18 | GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz | 18 | GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz |
| 19 | INSTALL = install | 19 | INSTALL = install |
| 20 | COPYTREE = cp -r | 20 | COPYTREE = cp -r |
diff --git a/git b/git | |||
| Subproject 5d826e972970a784bd7a7bdf587512510097b8c | Subproject 8104ec994ea3849a968b4667d072fedd1e68864 | ||
| @@ -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 | } |
| @@ -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) |
| @@ -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 | ||
| 61 | done: | 62 | done: |
| 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 | ||
| @@ -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 | } |
| @@ -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) |
| @@ -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 | } |
| @@ -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) |
