1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
7 SDESC[standard]= Fast web interface for git
8 HOMEPAGE= https://git.zx2c4.com/cgit/about/
11 DOWNLOAD_GROUPS= main fixedgit
12 SITES[main]= http://git.zx2c4.com/cgit/snapshot/
13 SITES[fixedgit]= https://www.kernel.org/pub/software/scm/git/
14 DISTFILE[1]= cgit-1.1.tar.xz:main
15 DISTFILE[2]= git-2.16.0.tar.xz:fixedgit
17 SPKGS[standard]= single
19 OPTIONS_AVAILABLE= none
20 OPTIONS_STANDARD= none
22 USES= cpe gmake iconv python:build shebangfix ssl zlib
26 LICENSE_FILE= GPLv2:{{WRKSRC}}/COPYING
28 CPE_VENDOR= lars_hjemli
29 FPC_EQUIVALENT= devel/cgit
30 SHEBANG_FILES= filters/email-gravatar.py
31 filters/html-converters/md2html
32 filters/html-converters/rst2html
33 filters/syntax-highlighting.py
35 MAKE_ARGS= CGIT_SCRIPT_PATH={{PREFIX}}/www/cgit
36 CGIT_CONFIG={{PREFIX}}/etc/cgitrc
44 INSTALL_REQ_TOOLCHAIN= yes
46 CFLAGS= -I{{OPENSSLINC}}
47 LDFLAGS= -L{{OPENSSLLIB}}
50 ${REINPLACE_CMD} -e 's/^\(GIT_VER =\).*$$/\1 2.16.0/' \
53 -e "s|\(ALL_CFLAGS =\)|\1 ${CFLAGS}|g" \
54 -e "s|\(ALL_LDFLAGS =\)|\1 ${LDFLAGS}|g" \
55 ${WRKSRC}/git/Makefile
56 # ${REINPLACE_CMD} -e 's|ALL_LDFLAGS|LDFLAGS|g' ${WRKSRC}/cgit.mk
59 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/www/cgit/cgit.cgi
62 ${RMDIR} ${WRKSRC}/git
63 ${MV} ${WRKDIR}/git-2.16.0 ${WRKSRC}/git
65 [FILE:102:descriptions/desc.single]
66 cgit is a fast web interface for the Git SCM, using a built-in cache to
67 decrease server I/O pressure.
71 0889af29be15fc981481caa09579f982b9740fe9fd2860ab87dff286f4635890 86268 cgit-1.1.tar.xz
72 0d10764e66b3d650dee0d99a1c77afa4aaae5e739c0973fcc1c5b9e6516e30f8 4961856 git-2.16.0.tar.xz
75 [FILE:399:manifests/plist.single]
82 gentoo-ldap-authentication.lua
83 lib/cgit/filters/html-converters/
90 simple-authentication.lua
91 syntax-highlighting.py
92 syntax-highlighting.sh
101 [FILE:4543:patches/patch-git-2.12.0]
102 From 5c80837ea913179a6a983076c4adbab42e6a31dc Mon Sep 17 00:00:00 2001
103 From: Christian Hesse <mail@eworm.de>
104 Date: Wed, 1 Mar 2017 11:37:59 +0100
105 Subject: git: update to v2.12.0
107 Update to git version v2.12.0: With commit 8aee769f (pathspec: copy and free
108 owned memory) member 'match' of 'struct pathspec_item' is no longer
109 'const char*' but just 'char*'.
119 10 files changed, 13 insertions(+), 13 deletions(-)
121 diff --git a/cgit.h b/cgit.h
122 index fbc6c6a..3eb04de 100644
125 @@ -355,10 +355,10 @@ extern int cgit_diff_files(const struct object_id *old_oid,
127 extern void cgit_diff_tree(const struct object_id *old_oid,
128 const struct object_id *new_oid,
129 - filepair_fn fn, const char *prefix, int ignorews);
130 + filepair_fn fn, char *prefix, int ignorews);
132 extern void cgit_diff_commit(struct commit *commit, filepair_fn fn,
133 - const char *prefix);
136 __attribute__((format (printf,1,2)))
137 extern char *fmt(const char *format,...);
138 diff --git a/shared.c b/shared.c
139 index c63f1e3..4602123 100644
142 @@ -336,7 +336,7 @@ int cgit_diff_files(const struct object_id *old_oid,
144 void cgit_diff_tree(const struct object_id *old_oid,
145 const struct object_id *new_oid,
146 - filepair_fn fn, const char *prefix, int ignorews)
147 + filepair_fn fn, char *prefix, int ignorews)
149 struct diff_options opt;
150 struct pathspec_item item;
151 @@ -367,7 +367,7 @@ void cgit_diff_tree(const struct object_id *old_oid,
155 -void cgit_diff_commit(struct commit *commit, filepair_fn fn, const char *prefix)
156 +void cgit_diff_commit(struct commit *commit, filepair_fn fn, char *prefix)
158 const struct object_id *old_oid = NULL;
160 diff --git a/ui-blob.c b/ui-blob.c
161 index 5f30de7..c759520 100644
164 @@ -33,7 +33,7 @@ static int walk_tree(const unsigned char *sha1, struct strbuf *base,
168 -int cgit_ref_path_exists(const char *path, const char *ref, int file_only)
169 +int cgit_ref_path_exists(char *path, const char *ref, int file_only)
171 struct object_id oid;
173 diff --git a/ui-blob.h b/ui-blob.h
174 index 16847b2..d4be56a 100644
181 -extern int cgit_ref_path_exists(const char *path, const char *ref, int file_only);
182 +extern int cgit_ref_path_exists(char *path, const char *ref, int file_only);
183 extern int cgit_print_file(char *path, const char *head, int file_only);
184 extern void cgit_print_blob(const char *hex, char *path, const char *head, int file_only);
186 diff --git a/ui-commit.c b/ui-commit.c
187 index db69d54..47b9025 100644
194 -void cgit_print_commit(char *hex, const char *prefix)
195 +void cgit_print_commit(char *hex, char *prefix)
197 struct commit *commit, *parent;
198 struct commitinfo *info, *parent_info;
199 diff --git a/ui-commit.h b/ui-commit.h
200 index 8198b4b..3d19eeb 100644
207 -extern void cgit_print_commit(char *hex, const char *prefix);
208 +extern void cgit_print_commit(char *hex, char *prefix);
210 #endif /* UI_COMMIT_H */
211 diff --git a/ui-diff.c b/ui-diff.c
212 index 173d351..e8e9897 100644
215 @@ -189,7 +189,7 @@ static void inspect_filepair(struct diff_filepair *pair)
217 static void cgit_print_diffstat(const struct object_id *old_oid,
218 const struct object_id *new_oid,
219 - const char *prefix)
224 @@ -382,7 +382,7 @@ void cgit_print_diff_ctrls(void)
227 void cgit_print_diff(const char *new_rev, const char *old_rev,
228 - const char *prefix, int show_ctrls, int raw)
229 + char *prefix, int show_ctrls, int raw)
231 struct commit *commit, *commit2;
232 const unsigned char *old_tree_sha1, *new_tree_sha1;
233 diff --git a/ui-diff.h b/ui-diff.h
234 index 39264a1..4d5a83c 100644
238 extern void cgit_print_diff_ctrls(void);
240 extern void cgit_print_diff(const char *new_hex, const char *old_hex,
241 - const char *prefix, int show_ctrls, int raw);
242 + char *prefix, int show_ctrls, int raw);
244 extern struct diff_filespec *cgit_get_current_old_file(void);
245 extern struct diff_filespec *cgit_get_current_new_file(void);
251 [FILE:2196:patches/patch-git-2.13.1]
252 From af3025cf50642452a2000327bb8e845fd2191423 Mon Sep 17 00:00:00 2001
253 From: Christian Hesse <mail@eworm.de>
254 Date: Tue, 6 Jun 2017 17:16:32 +0200
255 Subject: git: update to v2.13.1
257 Update to git version v2.13.1: With commit 8aee769f (pathspec: copy and free
258 owned memory) the definition of struct pathspec_item has changed with the
259 expectation that pathspecs will be managed dynamically. We work around this
260 a bit by setting up a static structure, but let's allocate the match string
261 to avoid needing to cast away const.
263 Updated a patch from John Keeping <john@keeping.me.uk> for git v2.12.1.
267 ui-blob.c | 9 ++++++---
268 3 files changed, 10 insertions(+), 5 deletions(-)
270 diff --git a/shared.c b/shared.c
271 index c63f1e3..13a65a9 100644
274 @@ -352,7 +352,7 @@ void cgit_diff_tree(const struct object_id *old_oid,
275 opt.format_callback = cgit_diff_tree_cb;
276 opt.format_callback_data = fn;
278 - item.match = prefix;
279 + item.match = xstrdup(prefix);
280 item.len = strlen(prefix);
282 opt.pathspec.items = &item;
283 @@ -365,6 +365,8 @@ void cgit_diff_tree(const struct object_id *old_oid,
284 diff_root_tree_sha1(new_oid->hash, "", &opt);
291 void cgit_diff_commit(struct commit *commit, filepair_fn fn, const char *prefix)
292 diff --git a/ui-blob.c b/ui-blob.c
293 index 5f30de7..793817f 100644
296 @@ -38,7 +38,7 @@ int cgit_ref_path_exists(const char *path, const char *ref, int file_only)
297 struct object_id oid;
299 struct pathspec_item path_items = {
301 + .match = xstrdup(path),
304 struct pathspec paths = {
305 @@ -53,10 +53,13 @@ int cgit_ref_path_exists(const char *path, const char *ref, int file_only)
308 if (get_oid(ref, &oid))
311 if (sha1_object_info(oid.hash, &size) != OBJ_COMMIT)
314 read_tree_recursive(lookup_commit_reference(oid.hash)->tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx);
317 + free(path_items.match);
318 return walk_tree_ctx.found_path;
326 [FILE:13568:patches/patch-git-2.14]
327 From 86a6d358f7a6c2432fde86b9e3c5011a656f20e4 Mon Sep 17 00:00:00 2001
328 From: Jeff Smith <whydoubt@gmail.com>
329 Date: Wed, 9 Aug 2017 19:02:56 -0500
330 Subject: git: update to v2.14
332 Numerous changes were made to git functions to use an object_id
333 structure rather than sending sha1 hashes as raw unsigned character
334 arrays. The functions that affect cgit are: parse_object,
335 lookup_commit_reference, lookup_tag, lookup_tree, parse_tree_indirect,
336 diff_root_tree_sha1, diff_tree_sha1, and format_display_notes.
338 Commit b2141fc (config: don't include config.h by default) made it
339 necessary to that config.h be explicitly included when needed.
341 Commit 07a3d41 (grep: remove regflags from the public grep_opt API)
342 removed one way of specifying the ignore-case grep option.
344 Signed-off-by: Jeff Smith <whydoubt@gmail.com>
348 scan-tree.c | 5 +++--
352 ui-commit.c | 6 +++---
353 ui-diff.c | 18 +++++++++---------
354 ui-log.c | 10 +++++-----
359 ui-tree.c | 18 +++++++++---------
360 14 files changed, 44 insertions(+), 43 deletions(-)
362 diff --git a/scan-tree.c b/scan-tree.c
363 index 08f3f1d..6a2f65a 100644
367 #include "scan-tree.h"
368 #include "configfile.h"
372 /* return 1 if path contains a objects/ directory and a HEAD file */
373 static int is_git_dir(const char *path)
374 @@ -48,7 +49,7 @@ out:
375 static struct cgit_repo *repo;
376 static repo_config_fn config_fn;
378 -static void repo_config(const char *name, const char *value)
379 +static void scan_tree_repo_config(const char *name, const char *value)
381 config_fn(repo, name, value);
383 @@ -178,7 +179,7 @@ static void add_repo(const char *base, struct strbuf *path, repo_config_fn fn)
385 strbuf_addstr(path, "cgitrc");
386 if (!stat(path->buf, &st))
387 - parse_configfile(path->buf, &repo_config);
388 + parse_configfile(path->buf, &scan_tree_repo_config);
390 strbuf_release(&rel);
392 diff --git a/shared.c b/shared.c
393 index 13a65a9..df3f611 100644
396 @@ -160,7 +160,7 @@ static struct refinfo *cgit_mk_refinfo(const char *refname, const struct object_
398 ref = xmalloc(sizeof (struct refinfo));
399 ref->refname = xstrdup(refname);
400 - ref->object = parse_object(oid->hash);
401 + ref->object = parse_object(oid);
402 switch (ref->object->type) {
404 ref->tag = cgit_parse_tag((struct tag *)ref->object);
405 @@ -360,9 +360,9 @@ void cgit_diff_tree(const struct object_id *old_oid,
406 diff_setup_done(&opt);
408 if (old_oid && !is_null_oid(old_oid))
409 - diff_tree_sha1(old_oid->hash, new_oid->hash, "", &opt);
410 + diff_tree_oid(old_oid, new_oid, "", &opt);
412 - diff_root_tree_sha1(new_oid->hash, "", &opt);
413 + diff_root_tree_oid(new_oid, "", &opt);
417 diff --git a/ui-blob.c b/ui-blob.c
418 index 793817f..761e886 100644
421 @@ -56,7 +56,7 @@ int cgit_ref_path_exists(const char *path, const char *ref, int file_only)
423 if (sha1_object_info(oid.hash, &size) != OBJ_COMMIT)
425 - read_tree_recursive(lookup_commit_reference(oid.hash)->tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx);
426 + read_tree_recursive(lookup_commit_reference(&oid)->tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx);
429 free(path_items.match);
430 @@ -89,7 +89,7 @@ int cgit_print_file(char *path, const char *head, int file_only)
432 type = sha1_object_info(oid.hash, &size);
433 if (type == OBJ_COMMIT) {
434 - commit = lookup_commit_reference(oid.hash);
435 + commit = lookup_commit_reference(&oid);
436 read_tree_recursive(commit->tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx);
437 if (!walk_tree_ctx.found_path)
439 @@ -145,7 +145,7 @@ void cgit_print_blob(const char *hex, char *path, const char *head, int file_onl
440 type = sha1_object_info(oid.hash, &size);
442 if ((!hex) && type == OBJ_COMMIT && path) {
443 - commit = lookup_commit_reference(oid.hash);
444 + commit = lookup_commit_reference(&oid);
445 read_tree_recursive(commit->tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx);
446 type = sha1_object_info(oid.hash, &size);
448 diff --git a/ui-clone.c b/ui-clone.c
449 index 5f6606a..0d11672 100644
452 @@ -17,7 +17,7 @@ static int print_ref_info(const char *refname, const struct object_id *oid,
456 - if (!(obj = parse_object(oid->hash)))
457 + if (!(obj = parse_object(oid)))
460 htmlf("%s\t%s\n", oid_to_hex(oid), refname);
461 diff --git a/ui-commit.c b/ui-commit.c
462 index db69d54..586fea0 100644
465 @@ -31,7 +31,7 @@ void cgit_print_commit(char *hex, const char *prefix)
466 "Bad object id: %s", hex);
469 - commit = lookup_commit_reference(oid.hash);
470 + commit = lookup_commit_reference(&oid);
472 cgit_print_error_page(404, "Not found",
473 "Bad commit reference: %s", hex);
474 @@ -39,7 +39,7 @@ void cgit_print_commit(char *hex, const char *prefix)
476 info = cgit_parse_commit(commit);
478 - format_display_notes(oid.hash, ¬es, PAGE_ENCODING, 0);
479 + format_display_notes(&oid, ¬es, PAGE_ENCODING, 0);
481 load_ref_decorations(DECORATE_FULL_REFS);
483 @@ -87,7 +87,7 @@ void cgit_print_commit(char *hex, const char *prefix)
485 html("</td></tr>\n");
486 for (p = commit->parents; p; p = p->next) {
487 - parent = lookup_commit_reference(p->item->object.oid.hash);
488 + parent = lookup_commit_reference(&p->item->object.oid);
490 html("<tr><td colspan='3'>");
491 cgit_print_error("Error reading parent commit");
492 diff --git a/ui-diff.c b/ui-diff.c
493 index 173d351..c7fb49b 100644
496 @@ -385,7 +385,7 @@ void cgit_print_diff(const char *new_rev, const char *old_rev,
497 const char *prefix, int show_ctrls, int raw)
499 struct commit *commit, *commit2;
500 - const unsigned char *old_tree_sha1, *new_tree_sha1;
501 + const struct object_id *old_tree_oid, *new_tree_oid;
505 @@ -407,13 +407,13 @@ void cgit_print_diff(const char *new_rev, const char *old_rev,
506 "Bad object name: %s", new_rev);
509 - commit = lookup_commit_reference(new_rev_oid->hash);
510 + commit = lookup_commit_reference(new_rev_oid);
511 if (!commit || parse_commit(commit)) {
512 cgit_print_error_page(404, "Not found",
513 "Bad commit: %s", oid_to_hex(new_rev_oid));
516 - new_tree_sha1 = commit->tree->object.oid.hash;
517 + new_tree_oid = &commit->tree->object.oid;
520 if (get_oid(old_rev, old_rev_oid)) {
521 @@ -428,15 +428,15 @@ void cgit_print_diff(const char *new_rev, const char *old_rev,
524 if (!is_null_oid(old_rev_oid)) {
525 - commit2 = lookup_commit_reference(old_rev_oid->hash);
526 + commit2 = lookup_commit_reference(old_rev_oid);
527 if (!commit2 || parse_commit(commit2)) {
528 cgit_print_error_page(404, "Not found",
529 "Bad commit: %s", oid_to_hex(old_rev_oid));
532 - old_tree_sha1 = commit2->tree->object.oid.hash;
533 + old_tree_oid = &commit2->tree->object.oid;
535 - old_tree_sha1 = NULL;
536 + old_tree_oid = NULL;
540 @@ -449,11 +449,11 @@ void cgit_print_diff(const char *new_rev, const char *old_rev,
542 ctx.page.mimetype = "text/plain";
543 cgit_print_http_headers();
544 - if (old_tree_sha1) {
545 - diff_tree_sha1(old_tree_sha1, new_tree_sha1, "",
546 + if (old_tree_oid) {
547 + diff_tree_oid(old_tree_oid, new_tree_oid, "",
550 - diff_root_tree_sha1(new_tree_sha1, "", &diffopt);
551 + diff_root_tree_oid(new_tree_oid, "", &diffopt);
553 diffcore_std(&diffopt);
554 diff_flush(&diffopt);
555 diff --git a/ui-log.c b/ui-log.c
556 index 3220fd9..2d2bb31 100644
559 @@ -150,9 +150,9 @@ static int show_commit(struct commit *commit, struct rev_info *revs)
562 DIFF_OPT_SET(&revs->diffopt, RECURSIVE);
563 - diff_tree_sha1(parent->tree->object.oid.hash,
564 - commit->tree->object.oid.hash,
565 - "", &revs->diffopt);
566 + diff_tree_oid(&parent->tree->object.oid,
567 + &commit->tree->object.oid,
568 + "", &revs->diffopt);
569 diffcore_std(&revs->diffopt);
571 found = !diff_queue_is_empty();
572 @@ -273,7 +273,7 @@ static void print_commit(struct commit *commit, struct rev_info *revs)
573 strbuf_addstr(&msgbuf, info->msg);
574 strbuf_addch(&msgbuf, '\n');
576 - format_display_notes(commit->object.oid.hash,
577 + format_display_notes(&commit->object.oid,
578 &msgbuf, PAGE_ENCODING, 0);
579 strbuf_addch(&msgbuf, '\n');
580 strbuf_ltrim(&msgbuf);
581 @@ -436,7 +436,7 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
582 setup_revisions(rev_argv.argc, rev_argv.argv, &rev, NULL);
583 load_ref_decorations(DECORATE_FULL_REFS);
584 rev.show_decorations = 1;
585 - rev.grep_filter.regflags |= REG_ICASE;
586 + rev.grep_filter.ignore_case = 1;
588 rev.diffopt.detect_rename = 1;
589 rev.diffopt.rename_limit = ctx.cfg.renamelimit;
590 diff --git a/ui-patch.c b/ui-patch.c
591 index 047e2f9..69aa4a8 100644
594 @@ -33,7 +33,7 @@ void cgit_print_patch(const char *new_rev, const char *old_rev,
595 "Bad object id: %s", new_rev);
598 - commit = lookup_commit_reference(new_rev_oid.hash);
599 + commit = lookup_commit_reference(&new_rev_oid);
601 cgit_print_error_page(404, "Not found",
602 "Bad commit reference: %s", new_rev);
603 @@ -46,7 +46,7 @@ void cgit_print_patch(const char *new_rev, const char *old_rev,
604 "Bad object id: %s", old_rev);
607 - if (!lookup_commit_reference(old_rev_oid.hash)) {
608 + if (!lookup_commit_reference(&old_rev_oid)) {
609 cgit_print_error_page(404, "Not found",
610 "Bad commit reference: %s", old_rev);
612 diff --git a/ui-plain.c b/ui-plain.c
613 index 8d541e3..e45d553 100644
616 @@ -185,7 +185,7 @@ void cgit_print_plain(void)
617 cgit_print_error_page(404, "Not found", "Not found");
620 - commit = lookup_commit_reference(oid.hash);
621 + commit = lookup_commit_reference(&oid);
622 if (!commit || parse_commit(commit)) {
623 cgit_print_error_page(404, "Not found", "Not found");
625 diff --git a/ui-snapshot.c b/ui-snapshot.c
626 index 9b8cddd..b2d95f7 100644
629 @@ -116,7 +116,7 @@ static int make_snapshot(const struct cgit_snapshot_format *format,
630 "Bad object id: %s", hex);
633 - if (!lookup_commit_reference(oid.hash)) {
634 + if (!lookup_commit_reference(&oid)) {
635 cgit_print_error_page(400, "Bad request",
636 "Not a commit reference: %s", hex);
638 diff --git a/ui-tag.c b/ui-tag.c
639 index afd7d61..909cde0 100644
642 @@ -54,7 +54,7 @@ void cgit_print_tag(char *revname)
643 "Bad tag reference: %s", revname);
646 - obj = parse_object(oid.hash);
647 + obj = parse_object(&oid);
649 cgit_print_error_page(500, "Internal server error",
650 "Bad object id: %s", oid_to_hex(&oid));
651 @@ -64,7 +64,7 @@ void cgit_print_tag(char *revname)
653 struct taginfo *info;
655 - tag = lookup_tag(oid.hash);
656 + tag = lookup_tag(&oid);
657 if (!tag || parse_tag(tag) || !(info = cgit_parse_tag(tag))) {
658 cgit_print_error_page(500, "Internal server error",
659 "Bad tag object: %s", revname);
660 diff --git a/ui-tree.c b/ui-tree.c
661 index b310242..ca24a03 100644
664 @@ -157,7 +157,7 @@ static void print_object(const unsigned char *sha1, char *path, const char *base
666 struct single_tree_ctx {
668 - unsigned char sha1[GIT_SHA1_RAWSZ];
669 + struct object_id oid;
673 @@ -177,7 +177,7 @@ static int single_tree_cb(const unsigned char *sha1, struct strbuf *base,
676 ctx->name = xstrdup(pathname);
677 - hashcpy(ctx->sha1, sha1);
678 + hashcpy(ctx->oid.hash, sha1);
679 strbuf_addf(ctx->path, "/%s", pathname);
682 @@ -195,13 +195,13 @@ static void write_tree_link(const unsigned char *sha1, char *name,
686 - hashcpy(tree_ctx.sha1, sha1);
687 + hashcpy(tree_ctx.oid.hash, sha1);
689 while (tree_ctx.count == 1) {
690 cgit_tree_link(name, NULL, "ls-dir", ctx.qry.head, rev,
693 - tree = lookup_tree(tree_ctx.sha1);
694 + tree = lookup_tree(&tree_ctx.oid);
698 @@ -300,17 +300,17 @@ static void ls_tail(void)
699 cgit_print_layout_end();
702 -static void ls_tree(const unsigned char *sha1, char *path, struct walk_tree_context *walk_tree_ctx)
703 +static void ls_tree(const struct object_id *oid, char *path, struct walk_tree_context *walk_tree_ctx)
706 struct pathspec paths = {
710 - tree = parse_tree_indirect(sha1);
711 + tree = parse_tree_indirect(oid);
713 cgit_print_error_page(404, "Not found",
714 - "Not a tree object: %s", sha1_to_hex(sha1));
715 + "Not a tree object: %s", sha1_to_hex(oid->hash));
719 @@ -380,7 +380,7 @@ void cgit_print_tree(const char *rev, char *path)
720 "Invalid revision name: %s", rev);
723 - commit = lookup_commit_reference(oid.hash);
724 + commit = lookup_commit_reference(&oid);
725 if (!commit || parse_commit(commit)) {
726 cgit_print_error_page(404, "Not found",
727 "Invalid commit reference: %s", rev);
728 @@ -390,7 +390,7 @@ void cgit_print_tree(const char *rev, char *path)
729 walk_tree_ctx.curr_rev = xstrdup(rev);
732 - ls_tree(commit->tree->object.oid.hash, NULL, &walk_tree_ctx);
733 + ls_tree(&commit->tree->object.oid, NULL, &walk_tree_ctx);
742 [FILE:3650:patches/patch-git-2.16]
743 From 1dd53e3a2ffec730ec27ebe15b3d63e0b417a544 Mon Sep 17 00:00:00 2001
744 From: Christian Hesse <mail@eworm.de>
745 Date: Thu, 18 Jan 2018 09:19:31 +0100
746 Subject: git: update to v2.16.0
748 Update to git version v2.16.0:
750 * refs: convert resolve_ref_unsafe to struct object_id
751 (49e61479be913f67e66bb3fdf8de9475c41b58bd)
752 * diff: remove DIFF_OPT_SET macro
753 (23dcf77f48feb49c54bad09210f093a799816334)
754 * log: add option to choose which refs to decorate
755 (65516f586b69307f977cd67cc45513a296cabc25)
756 * diff: convert flags to be stored in bitfields
757 (02f2f56bc377c287c411947d0e1482aac888f8db)
759 Signed-off-by: Christian Hesse <mail@eworm.de>
769 8 files changed, 10 insertions(+), 11 deletions(-)
771 diff --git a/cgit.c b/cgit.c
772 index 972a67e..a3702c2 100644
775 @@ -478,7 +478,7 @@ static char *guess_defbranch(void)
776 const char *ref, *refname;
777 struct object_id oid;
779 - ref = resolve_ref_unsafe("HEAD", 0, oid.hash, NULL);
780 + ref = resolve_ref_unsafe("HEAD", 0, &oid, NULL);
781 if (!ref || !skip_prefix(ref, "refs/heads/", &refname))
783 return xstrdup(refname);
784 diff --git a/shared.c b/shared.c
785 index df3f611..21ac8f4 100644
788 @@ -346,7 +346,7 @@ void cgit_diff_tree(const struct object_id *old_oid,
789 opt.output_format = DIFF_FORMAT_CALLBACK;
790 opt.detect_rename = 1;
791 opt.rename_limit = ctx.cfg.renamelimit;
792 - DIFF_OPT_SET(&opt, RECURSIVE);
793 + opt.flags.recursive = 1;
795 DIFF_XDL_SET(&opt, IGNORE_WHITESPACE);
796 opt.format_callback = cgit_diff_tree_cb;
797 diff --git a/ui-commit.c b/ui-commit.c
798 index 586fea0..abf58f6 100644
801 @@ -41,7 +41,7 @@ void cgit_print_commit(char *hex, const char *prefix)
803 format_display_notes(&oid, ¬es, PAGE_ENCODING, 0);
805 - load_ref_decorations(DECORATE_FULL_REFS);
806 + load_ref_decorations(NULL, DECORATE_FULL_REFS);
808 cgit_print_layout_start();
809 cgit_print_diff_ctrls();
810 diff --git a/ui-diff.c b/ui-diff.c
811 index c7fb49b..a10ce8a 100644
814 @@ -444,7 +444,7 @@ void cgit_print_diff(const char *new_rev, const char *old_rev,
816 diff_setup(&diffopt);
817 diffopt.output_format = DIFF_FORMAT_PATCH;
818 - DIFF_OPT_SET(&diffopt, RECURSIVE);
819 + diffopt.flags.recursive = 1;
820 diff_setup_done(&diffopt);
822 ctx.page.mimetype = "text/plain";
823 diff --git a/ui-log.c b/ui-log.c
824 index 2d2bb31..8e36fba 100644
827 @@ -119,8 +119,7 @@ static int show_commit(struct commit *commit, struct rev_info *revs)
828 struct commit_list *parents = commit->parents;
829 struct commit *parent;
830 int found = 0, saved_fmt;
831 - unsigned saved_flags = revs->diffopt.flags;
833 + struct diff_flags saved_flags = revs->diffopt.flags;
835 /* Always show if we're not in "follow" mode with a single file. */
837 @@ -149,7 +148,7 @@ static int show_commit(struct commit *commit, struct rev_info *revs)
841 - DIFF_OPT_SET(&revs->diffopt, RECURSIVE);
842 + revs->diffopt.flags.recursive = 1;
843 diff_tree_oid(&parent->tree->object.oid,
844 &commit->tree->object.oid,
846 @@ -434,7 +433,7 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
847 rev.ignore_missing = 1;
848 rev.simplify_history = 1;
849 setup_revisions(rev_argv.argc, rev_argv.argv, &rev, NULL);
850 - load_ref_decorations(DECORATE_FULL_REFS);
851 + load_ref_decorations(NULL, DECORATE_FULL_REFS);
852 rev.show_decorations = 1;
853 rev.grep_filter.ignore_case = 1;
860 [FILE:421:patches/patch-ui-snapshot.c]
861 --- ui-snapshot.c.orig 2016-12-01 13:52:53 UTC
863 @@ -37,7 +37,7 @@ static int write_archive_type(const char
864 /* argv_array guarantees a trailing NULL entry. */
865 memcpy(nargv, argv.argv, sizeof(char *) * (argv.argc + 1));
867 - result = write_archive(argv.argc, nargv, NULL, 1, NULL, 0);
868 + result = write_archive(argv.argc, nargv, NULL, NULL, 0);
869 argv_array_clear(&argv);