aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Hesse2016-01-05 07:38:53 +0100
committerJason A. Donenfeld2016-01-13 17:12:17 +0100
commit559ab5ecc4445c8477ecf62c9fc97efa412dd562 (patch)
treeef19237ed99976f886ad6ca660f9a9961b4e656a
parent6edc84bc44d55d7f90a40238ae2107913e15f54b (diff)
downloadcgit-559ab5ecc4445c8477ecf62c9fc97efa412dd562.tar.gz
cgit-559ab5ecc4445c8477ecf62c9fc97efa412dd562.tar.bz2
cgit-559ab5ecc4445c8477ecf62c9fc97efa412dd562.zip
git: update to v2.7.0
Update to git version v2.7.0. * Upstream commit ed1c9977cb1b63e4270ad8bdf967a2d02580aa08 (Remove get_object_hash.) changed API: Convert all instances of get_object_hash to use an appropriate reference to the hash member of the oid member of struct object. This provides no functional change, as it is essentially a macro substitution. Signed-off-by: Christian Hesse <mail@eworm.de>
-rw-r--r--Makefile2
m---------git0
-rw-r--r--parsing.c4
-rw-r--r--shared.c4
-rw-r--r--ui-atom.c2
-rw-r--r--ui-clone.c2
-rw-r--r--ui-commit.c12
-rw-r--r--ui-diff.c6
-rw-r--r--ui-log.c12
-rw-r--r--ui-patch.c2
-rw-r--r--ui-plain.c2
-rw-r--r--ui-shared.c2
-rw-r--r--ui-tree.c2
13 files changed, 26 insertions, 26 deletions
diff --git a/Makefile b/Makefile
index 77b9f60..9bb9cd5 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.6.1 17GIT_VER = 2.7.0
18GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.gz 18GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.gz
19INSTALL = install 19INSTALL = install
20COPYTREE = cp -r 20COPYTREE = cp -r
diff --git a/git b/git
Subproject 22f698cb188243b313e024d618283e0293e3714 Subproject 754884255bb580df159e58defa81cdd30b5c430
diff --git a/parsing.c b/parsing.c
index f903c7c..5283e58 100644
--- a/parsing.c
+++ b/parsing.c
@@ -139,7 +139,7 @@ struct commitinfo *cgit_parse_commit(struct commit *commit)
139 return ret; 139 return ret;
140 140
141 if (!skip_prefix(p, "tree ", &p)) 141 if (!skip_prefix(p, "tree ", &p))
142 die("Bad commit: %s", sha1_to_hex(commit->object.sha1)); 142 die("Bad commit: %s", oid_to_hex(&commit->object.oid));
143 p += sha1hex_len + 1; 143 p += sha1hex_len + 1;
144 144
145 while (skip_prefix(p, "parent ", &p)) 145 while (skip_prefix(p, "parent ", &p))
@@ -199,7 +199,7 @@ struct taginfo *cgit_parse_tag(struct tag *tag)
199 const char *p; 199 const char *p;
200 struct taginfo *ret = NULL; 200 struct taginfo *ret = NULL;
201 201
202 data = read_sha1_file(tag->object.sha1, &type, &size); 202 data = read_sha1_file(tag->object.oid.hash, &type, &size);
203 if (!data || type != OBJ_TAG) 203 if (!data || type != OBJ_TAG)
204 goto cleanup; 204 goto cleanup;
205 205
diff --git a/shared.c b/shared.c
index e216c64..42b2ddc 100644
--- a/shared.c
+++ b/shared.c
@@ -402,8 +402,8 @@ void cgit_diff_commit(struct commit *commit, filepair_fn fn, const char *prefix)
402 unsigned char *old_sha1 = NULL; 402 unsigned char *old_sha1 = NULL;
403 403
404 if (commit->parents) 404 if (commit->parents)
405 old_sha1 = commit->parents->item->object.sha1; 405 old_sha1 = commit->parents->item->object.oid.hash;
406 cgit_diff_tree(old_sha1, commit->object.sha1, fn, prefix, 406 cgit_diff_tree(old_sha1, commit->object.oid.hash, fn, prefix,
407 ctx.qry.ignorews); 407 ctx.qry.ignorews);
408} 408}
409 409
diff --git a/ui-atom.c b/ui-atom.c
index e186299..11ea0c0 100644
--- a/ui-atom.c
+++ b/ui-atom.c
@@ -19,7 +19,7 @@ static void add_entry(struct commit *commit, const char *host)
19 struct commitinfo *info; 19 struct commitinfo *info;
20 20
21 info = cgit_parse_commit(commit); 21 info = cgit_parse_commit(commit);
22 hex = sha1_to_hex(commit->object.sha1); 22 hex = oid_to_hex(&commit->object.oid);
23 html("<entry>\n"); 23 html("<entry>\n");
24 html("<title>"); 24 html("<title>");
25 html_txt(info->subject); 25 html_txt(info->subject);
diff --git a/ui-clone.c b/ui-clone.c
index f7b0b04..5f6606a 100644
--- a/ui-clone.c
+++ b/ui-clone.c
@@ -24,7 +24,7 @@ static int print_ref_info(const char *refname, const struct object_id *oid,
24 if (obj->type == OBJ_TAG) { 24 if (obj->type == OBJ_TAG) {
25 if (!(obj = deref_tag(obj, refname, 0))) 25 if (!(obj = deref_tag(obj, refname, 0)))
26 return 0; 26 return 0;
27 htmlf("%s\t%s^{}\n", sha1_to_hex(obj->sha1), refname); 27 htmlf("%s\t%s^{}\n", oid_to_hex(&obj->oid), refname);
28 } 28 }
29 return 0; 29 return 0;
30} 30}
diff --git a/ui-commit.c b/ui-commit.c
index 2bca7a0..0c3d740 100644
--- a/ui-commit.c
+++ b/ui-commit.c
@@ -69,14 +69,14 @@ void cgit_print_commit(char *hex, const char *prefix)
69 cgit_print_date(info->committer_date, FMT_LONGDATE, ctx.cfg.local_time); 69 cgit_print_date(info->committer_date, FMT_LONGDATE, ctx.cfg.local_time);
70 html("</td></tr>\n"); 70 html("</td></tr>\n");
71 html("<tr><th>commit</th><td colspan='2' class='sha1'>"); 71 html("<tr><th>commit</th><td colspan='2' class='sha1'>");
72 tmp = sha1_to_hex(commit->object.sha1); 72 tmp = oid_to_hex(&commit->object.oid);
73 cgit_commit_link(tmp, NULL, NULL, ctx.qry.head, tmp, prefix); 73 cgit_commit_link(tmp, NULL, NULL, ctx.qry.head, tmp, prefix);
74 html(" ("); 74 html(" (");
75 cgit_patch_link("patch", NULL, NULL, NULL, tmp, prefix); 75 cgit_patch_link("patch", NULL, NULL, NULL, tmp, prefix);
76 html(")</td></tr>\n"); 76 html(")</td></tr>\n");
77 html("<tr><th>tree</th><td colspan='2' class='sha1'>"); 77 html("<tr><th>tree</th><td colspan='2' class='sha1'>");
78 tmp = xstrdup(hex); 78 tmp = xstrdup(hex);
79 cgit_tree_link(sha1_to_hex(commit->tree->object.sha1), NULL, NULL, 79 cgit_tree_link(oid_to_hex(&commit->tree->object.oid), NULL, NULL,
80 ctx.qry.head, tmp, NULL); 80 ctx.qry.head, tmp, NULL);
81 if (prefix) { 81 if (prefix) {
82 html(" /"); 82 html(" /");
@@ -85,7 +85,7 @@ void cgit_print_commit(char *hex, const char *prefix)
85 free(tmp); 85 free(tmp);
86 html("</td></tr>\n"); 86 html("</td></tr>\n");
87 for (p = commit->parents; p; p = p->next) { 87 for (p = commit->parents; p; p = p->next) {
88 parent = lookup_commit_reference(p->item->object.sha1); 88 parent = lookup_commit_reference(p->item->object.oid.hash);
89 if (!parent) { 89 if (!parent) {
90 html("<tr><td colspan='3'>"); 90 html("<tr><td colspan='3'>");
91 cgit_print_error("Error reading parent commit"); 91 cgit_print_error("Error reading parent commit");
@@ -94,7 +94,7 @@ void cgit_print_commit(char *hex, const char *prefix)
94 } 94 }
95 html("<tr><th>parent</th>" 95 html("<tr><th>parent</th>"
96 "<td colspan='2' class='sha1'>"); 96 "<td colspan='2' class='sha1'>");
97 tmp = tmp2 = sha1_to_hex(p->item->object.sha1); 97 tmp = tmp2 = oid_to_hex(&p->item->object.oid);
98 if (ctx.repo->enable_subject_links) { 98 if (ctx.repo->enable_subject_links) {
99 parent_info = cgit_parse_commit(parent); 99 parent_info = cgit_parse_commit(parent);
100 tmp2 = parent_info->subject; 100 tmp2 = parent_info->subject;
@@ -102,7 +102,7 @@ void cgit_print_commit(char *hex, const char *prefix)
102 cgit_commit_link(tmp2, NULL, NULL, ctx.qry.head, tmp, prefix); 102 cgit_commit_link(tmp2, NULL, NULL, ctx.qry.head, tmp, prefix);
103 html(" ("); 103 html(" (");
104 cgit_diff_link("diff", NULL, NULL, ctx.qry.head, hex, 104 cgit_diff_link("diff", NULL, NULL, ctx.qry.head, hex,
105 sha1_to_hex(p->item->object.sha1), prefix); 105 oid_to_hex(&p->item->object.oid), prefix);
106 html(")</td></tr>"); 106 html(")</td></tr>");
107 parents++; 107 parents++;
108 } 108 }
@@ -135,7 +135,7 @@ void cgit_print_commit(char *hex, const char *prefix)
135 } 135 }
136 if (parents < 3) { 136 if (parents < 3) {
137 if (parents) 137 if (parents)
138 tmp = sha1_to_hex(commit->parents->item->object.sha1); 138 tmp = oid_to_hex(&commit->parents->item->object.oid);
139 else 139 else
140 tmp = NULL; 140 tmp = NULL;
141 cgit_print_diff(ctx.qry.sha1, tmp, prefix, 0, 0); 141 cgit_print_diff(ctx.qry.sha1, tmp, prefix, 0, 0);
diff --git a/ui-diff.c b/ui-diff.c
index 5d18296..52ed942 100644
--- a/ui-diff.c
+++ b/ui-diff.c
@@ -413,7 +413,7 @@ void cgit_print_diff(const char *new_rev, const char *old_rev,
413 "Bad commit: %s", sha1_to_hex(new_rev_sha1)); 413 "Bad commit: %s", sha1_to_hex(new_rev_sha1));
414 return; 414 return;
415 } 415 }
416 new_tree_sha1 = commit->tree->object.sha1; 416 new_tree_sha1 = commit->tree->object.oid.hash;
417 417
418 if (old_rev) { 418 if (old_rev) {
419 if (get_sha1(old_rev, old_rev_sha1)) { 419 if (get_sha1(old_rev, old_rev_sha1)) {
@@ -422,7 +422,7 @@ void cgit_print_diff(const char *new_rev, const char *old_rev,
422 return; 422 return;
423 } 423 }
424 } else if (commit->parents && commit->parents->item) { 424 } else if (commit->parents && commit->parents->item) {
425 hashcpy(old_rev_sha1, commit->parents->item->object.sha1); 425 hashcpy(old_rev_sha1, commit->parents->item->object.oid.hash);
426 } else { 426 } else {
427 hashclr(old_rev_sha1); 427 hashclr(old_rev_sha1);
428 } 428 }
@@ -434,7 +434,7 @@ void cgit_print_diff(const char *new_rev, const char *old_rev,
434 "Bad commit: %s", sha1_to_hex(old_rev_sha1)); 434 "Bad commit: %s", sha1_to_hex(old_rev_sha1));
435 return; 435 return;
436 } 436 }
437 old_tree_sha1 = commit2->tree->object.sha1; 437 old_tree_sha1 = commit2->tree->object.oid.hash;
438 } else { 438 } else {
439 old_tree_sha1 = NULL; 439 old_tree_sha1 = NULL;
440 } 440 }
diff --git a/ui-log.c b/ui-log.c
index 0782478..4573255 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -82,14 +82,14 @@ void show_commit_decorations(struct commit *commit)
82 goto next; 82 goto next;
83 strncpy(buf, deco->name + 13, sizeof(buf) - 1); 83 strncpy(buf, deco->name + 13, sizeof(buf) - 1);
84 cgit_log_link(buf, NULL, "remote-deco", NULL, 84 cgit_log_link(buf, NULL, "remote-deco", NULL,
85 sha1_to_hex(commit->object.sha1), 85 oid_to_hex(&commit->object.oid),
86 ctx.qry.vpath, 0, NULL, NULL, 86 ctx.qry.vpath, 0, NULL, NULL,
87 ctx.qry.showmsg, 0); 87 ctx.qry.showmsg, 0);
88 } 88 }
89 else { 89 else {
90 strncpy(buf, deco->name, sizeof(buf) - 1); 90 strncpy(buf, deco->name, sizeof(buf) - 1);
91 cgit_commit_link(buf, NULL, "deco", ctx.qry.head, 91 cgit_commit_link(buf, NULL, "deco", ctx.qry.head,
92 sha1_to_hex(commit->object.sha1), 92 oid_to_hex(&commit->object.oid),
93 ctx.qry.vpath); 93 ctx.qry.vpath);
94 } 94 }
95next: 95next:
@@ -148,8 +148,8 @@ static int show_commit(struct commit *commit, struct rev_info *revs)
148 rem_lines = 0; 148 rem_lines = 0;
149 149
150 DIFF_OPT_SET(&revs->diffopt, RECURSIVE); 150 DIFF_OPT_SET(&revs->diffopt, RECURSIVE);
151 diff_tree_sha1(parent->tree->object.sha1, 151 diff_tree_sha1(parent->tree->object.oid.hash,
152 commit->tree->object.sha1, 152 commit->tree->object.oid.hash,
153 "", &revs->diffopt); 153 "", &revs->diffopt);
154 diffcore_std(&revs->diffopt); 154 diffcore_std(&revs->diffopt);
155 155
@@ -233,7 +233,7 @@ static void print_commit(struct commit *commit, struct rev_info *revs)
233 } 233 }
234 } 234 }
235 cgit_commit_link(info->subject, NULL, NULL, ctx.qry.head, 235 cgit_commit_link(info->subject, NULL, NULL, ctx.qry.head,
236 sha1_to_hex(commit->object.sha1), ctx.qry.vpath); 236 oid_to_hex(&commit->object.oid), ctx.qry.vpath);
237 show_commit_decorations(commit); 237 show_commit_decorations(commit);
238 html("</td><td>"); 238 html("</td><td>");
239 cgit_open_filter(ctx.repo->email_filter, info->author_email, "log"); 239 cgit_open_filter(ctx.repo->email_filter, info->author_email, "log");
@@ -269,7 +269,7 @@ static void print_commit(struct commit *commit, struct rev_info *revs)
269 strbuf_addstr(&msgbuf, info->msg); 269 strbuf_addstr(&msgbuf, info->msg);
270 strbuf_addch(&msgbuf, '\n'); 270 strbuf_addch(&msgbuf, '\n');
271 } 271 }
272 format_display_notes(commit->object.sha1, 272 format_display_notes(commit->object.oid.hash,
273 &msgbuf, PAGE_ENCODING, 0); 273 &msgbuf, PAGE_ENCODING, 0);
274 strbuf_addch(&msgbuf, '\n'); 274 strbuf_addch(&msgbuf, '\n');
275 strbuf_ltrim(&msgbuf); 275 strbuf_ltrim(&msgbuf);
diff --git a/ui-patch.c b/ui-patch.c
index 430231e..4c051e8 100644
--- a/ui-patch.c
+++ b/ui-patch.c
@@ -48,7 +48,7 @@ void cgit_print_patch(const char *new_rev, const char *old_rev,
48 return; 48 return;
49 } 49 }
50 } else if (commit->parents && commit->parents->item) { 50 } else if (commit->parents && commit->parents->item) {
51 hashcpy(old_rev_sha1, commit->parents->item->object.sha1); 51 hashcpy(old_rev_sha1, commit->parents->item->object.oid.hash);
52 } else { 52 } else {
53 hashclr(old_rev_sha1); 53 hashclr(old_rev_sha1);
54 } 54 }
diff --git a/ui-plain.c b/ui-plain.c
index e4beb99..58addab 100644
--- a/ui-plain.c
+++ b/ui-plain.c
@@ -183,7 +183,7 @@ void cgit_print_plain(void)
183 if (!path_items.match) { 183 if (!path_items.match) {
184 path_items.match = ""; 184 path_items.match = "";
185 walk_tree_ctx.match_baselen = -1; 185 walk_tree_ctx.match_baselen = -1;
186 print_dir(commit->tree->object.sha1, "", 0, ""); 186 print_dir(commit->tree->object.oid.hash, "", 0, "");
187 walk_tree_ctx.match = 2; 187 walk_tree_ctx.match = 2;
188 } 188 }
189 else 189 else
diff --git a/ui-shared.c b/ui-shared.c
index c04f380..48358cc 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -525,7 +525,7 @@ void cgit_object_link(struct object *obj)
525{ 525{
526 char *page, *shortrev, *fullrev, *name; 526 char *page, *shortrev, *fullrev, *name;
527 527
528 fullrev = sha1_to_hex(obj->sha1); 528 fullrev = oid_to_hex(&obj->oid);
529 shortrev = xstrdup(fullrev); 529 shortrev = xstrdup(fullrev);
530 shortrev[10] = '\0'; 530 shortrev[10] = '\0';
531 if (obj->type == OBJ_COMMIT) { 531 if (obj->type == OBJ_COMMIT) {
diff --git a/ui-tree.c b/ui-tree.c
index d71503d..3ff2320 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -287,7 +287,7 @@ void cgit_print_tree(const char *rev, char *path)
287 walk_tree_ctx.curr_rev = xstrdup(rev); 287 walk_tree_ctx.curr_rev = xstrdup(rev);
288 288
289 if (path == NULL) { 289 if (path == NULL) {
290 ls_tree(commit->tree->object.sha1, NULL, &walk_tree_ctx); 290 ls_tree(commit->tree->object.oid.hash, NULL, &walk_tree_ctx);
291 goto cleanup; 291 goto cleanup;
292 } 292 }
293 293