History

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.

Christian Hesse committed 10 years ago

Commit 559ab5e1 parent 6edc84b13 files · +27 −27Browse files

Unified · Split

13 files
  1. Makefile +1 −1
  2. git +1 −1
  3. parsing.c +2 −2
  4. shared.c +2 −2
  5. ui-atom.c +1 −1
  6. ui-clone.c +1 −1
  7. ui-commit.c +6 −6
  8. ui-diff.c +3 −3
  9. ui-log.c +6 −6
  10. ui-patch.c +1 −1
  11. ui-plain.c +1 −1
  12. ui-shared.c +1 −1
  13. ui-tree.c +1 −1
Makefile+1−1
@@ -14,7 +14,7 @@ htmldir = $(docdir) · 13 unmodified lines
1414 pdfdir = $(docdir)
1515 mandir = $(prefix)/share/man
1616 SHA1_HEADER = <openssl/sha.h>
17−GIT_VER = 2.6.1
17+GIT_VER = 2.7.0
1818 GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.gz
1919 INSTALL = install
2020 COPYTREE = cp -r
git+1−1
@@ -1 +1 @@
1−Subproject commit 22f698cb188243b313e024d618283e0293e37140
1+Subproject commit 754884255bb580df159e58defa81cdd30b5c430c
parsing.c+2−2
@@ -139,7 +139,7 @@ struct commitinfo *cgit_parse_commit(struct commit *commit) · 138 unmodified lines
139139 return ret;
140140
141141 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));
143143 p += sha1hex_len + 1;
144144
145145 while (skip_prefix(p, "parent ", &p))
@@ -199,7 +199,7 @@ struct taginfo *cgit_parse_tag(struct tag *tag) · 53 unmodified lines
199199 const char *p;
200200 struct taginfo *ret = NULL;
201201
202− data = read_sha1_file(tag->object.sha1, &type, &size);
202+ data = read_sha1_file(tag->object.oid.hash, &type, &size);
203203 if (!data || type != OBJ_TAG)
204204 goto cleanup;
205205
shared.c+2−2
@@ -402,8 +402,8 @@ void cgit_diff_commit(struct commit *commit, filepair_fn fn, const char *prefix) · 401 unmodified lines
402402 unsigned char *old_sha1 = NULL;
403403
404404 if (commit->parents)
405− old_sha1 = commit->parents->item->object.sha1;
406− cgit_diff_tree(old_sha1, commit->object.sha1, fn, prefix,
405+ old_sha1 = commit->parents->item->object.oid.hash;
406+ cgit_diff_tree(old_sha1, commit->object.oid.hash, fn, prefix,
407407 ctx.qry.ignorews);
408408 }
409409
ui-atom.c+1−1
@@ -19,7 +19,7 @@ static void add_entry(struct commit *commit, const char *host) · 18 unmodified lines
1919 struct commitinfo *info;
2020
2121 info = cgit_parse_commit(commit);
22− hex = sha1_to_hex(commit->object.sha1);
22+ hex = oid_to_hex(&commit->object.oid);
2323 html("<entry>\n");
2424 html("<title>");
2525 html_txt(info->subject);
ui-clone.c+1−1
@@ -24,7 +24,7 @@ static int print_ref_info(const char *refname, const struct object_id *oid, · 23 unmodified lines
2424 if (obj->type == OBJ_TAG) {
2525 if (!(obj = deref_tag(obj, refname, 0)))
2626 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);
2828 }
2929 return 0;
3030 }
ui-commit.c+6−6
@@ -69,14 +69,14 @@ void cgit_print_commit(char *hex, const char *prefix) · 68 unmodified lines
6969 cgit_print_date(info->committer_date, FMT_LONGDATE, ctx.cfg.local_time);
7070 html("</td></tr>\n");
7171 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);
7373 cgit_commit_link(tmp, NULL, NULL, ctx.qry.head, tmp, prefix);
7474 html(" (");
7575 cgit_patch_link("patch", NULL, NULL, NULL, tmp, prefix);
7676 html(")</td></tr>\n");
7777 html("<tr><th>tree</th><td colspan='2' class='sha1'>");
7878 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,
8080 ctx.qry.head, tmp, NULL);
8181 if (prefix) {
8282 html(" /");
@@ -85,7 +85,7 @@ void cgit_print_commit(char *hex, const char *prefix) · 2 unmodified lines
8585 free(tmp);
8686 html("</td></tr>\n");
8787 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);
8989 if (!parent) {
9090 html("<tr><td colspan='3'>");
9191 cgit_print_error("Error reading parent commit");
@@ -94,7 +94,7 @@ void cgit_print_commit(char *hex, const char *prefix) · 2 unmodified lines
9494 }
9595 html("<tr><th>parent</th>"
9696 "<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);
9898 if (ctx.repo->enable_subject_links) {
9999 parent_info = cgit_parse_commit(parent);
100100 tmp2 = parent_info->subject;
@@ -102,7 +102,7 @@ void cgit_print_commit(char *hex, const char *prefix) · 1 unmodified line
102102 cgit_commit_link(tmp2, NULL, NULL, ctx.qry.head, tmp, prefix);
103103 html(" (");
104104 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);
106106 html(")</td></tr>");
107107 parents++;
108108 }
@@ -135,7 +135,7 @@ void cgit_print_commit(char *hex, const char *prefix) · 26 unmodified lines
135135 }
136136 if (parents < 3) {
137137 if (parents)
138− tmp = sha1_to_hex(commit->parents->item->object.sha1);
138+ tmp = oid_to_hex(&commit->parents->item->object.oid);
139139 else
140140 tmp = NULL;
141141 cgit_print_diff(ctx.qry.sha1, tmp, prefix, 0, 0);
ui-diff.c+3−3
@@ -413,7 +413,7 @@ void cgit_print_diff(const char *new_rev, const char *old_rev, · 412 unmodified lines
413413 "Bad commit: %s", sha1_to_hex(new_rev_sha1));
414414 return;
415415 }
416− new_tree_sha1 = commit->tree->object.sha1;
416+ new_tree_sha1 = commit->tree->object.oid.hash;
417417
418418 if (old_rev) {
419419 if (get_sha1(old_rev, old_rev_sha1)) {
@@ -422,7 +422,7 @@ void cgit_print_diff(const char *new_rev, const char *old_rev, · 2 unmodified lines
422422 return;
423423 }
424424 } 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);
426426 } else {
427427 hashclr(old_rev_sha1);
428428 }
@@ -434,7 +434,7 @@ void cgit_print_diff(const char *new_rev, const char *old_rev, · 5 unmodified lines
434434 "Bad commit: %s", sha1_to_hex(old_rev_sha1));
435435 return;
436436 }
437− old_tree_sha1 = commit2->tree->object.sha1;
437+ old_tree_sha1 = commit2->tree->object.oid.hash;
438438 } else {
439439 old_tree_sha1 = NULL;
440440 }
ui-log.c+6−6
@@ -82,14 +82,14 @@ void show_commit_decorations(struct commit *commit) · 81 unmodified lines
8282 goto next;
8383 strncpy(buf, deco->name + 13, sizeof(buf) - 1);
8484 cgit_log_link(buf, NULL, "remote-deco", NULL,
85− sha1_to_hex(commit->object.sha1),
85+ oid_to_hex(&commit->object.oid),
8686 ctx.qry.vpath, 0, NULL, NULL,
8787 ctx.qry.showmsg, 0);
8888 }
8989 else {
9090 strncpy(buf, deco->name, sizeof(buf) - 1);
9191 cgit_commit_link(buf, NULL, "deco", ctx.qry.head,
92− sha1_to_hex(commit->object.sha1),
92+ oid_to_hex(&commit->object.oid),
9393 ctx.qry.vpath);
9494 }
9595 next:
@@ -148,8 +148,8 @@ static int show_commit(struct commit *commit, struct rev_info *revs) · 52 unmodified lines
148148 rem_lines = 0;
149149
150150 DIFF_OPT_SET(&revs->diffopt, RECURSIVE);
151− diff_tree_sha1(parent->tree->object.sha1,
152− commit->tree->object.sha1,
151+ diff_tree_sha1(parent->tree->object.oid.hash,
152+ commit->tree->object.oid.hash,
153153 "", &revs->diffopt);
154154 diffcore_std(&revs->diffopt);
155155
@@ -233,7 +233,7 @@ static void print_commit(struct commit *commit, struct rev_info *revs) · 77 unmodified lines
233233 }
234234 }
235235 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);
237237 show_commit_decorations(commit);
238238 html("</td><td>");
239239 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) · 29 unmodified lines
269269 strbuf_addstr(&msgbuf, info->msg);
270270 strbuf_addch(&msgbuf, '\n');
271271 }
272− format_display_notes(commit->object.sha1,
272+ format_display_notes(commit->object.oid.hash,
273273 &msgbuf, PAGE_ENCODING, 0);
274274 strbuf_addch(&msgbuf, '\n');
275275 strbuf_ltrim(&msgbuf);
ui-patch.c+1−1
@@ -48,7 +48,7 @@ void cgit_print_patch(const char *new_rev, const char *old_rev, · 47 unmodified lines
4848 return;
4949 }
5050 } 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);
5252 } else {
5353 hashclr(old_rev_sha1);
5454 }
ui-plain.c+1−1
@@ -183,7 +183,7 @@ void cgit_print_plain(void) · 182 unmodified lines
183183 if (!path_items.match) {
184184 path_items.match = "";
185185 walk_tree_ctx.match_baselen = -1;
186− print_dir(commit->tree->object.sha1, "", 0, "");
186+ print_dir(commit->tree->object.oid.hash, "", 0, "");
187187 walk_tree_ctx.match = 2;
188188 }
189189 else
ui-shared.c+1−1
@@ -525,7 +525,7 @@ void cgit_object_link(struct object *obj) · 524 unmodified lines
525525 {
526526 char *page, *shortrev, *fullrev, *name;
527527
528− fullrev = sha1_to_hex(obj->sha1);
528+ fullrev = oid_to_hex(&obj->oid);
529529 shortrev = xstrdup(fullrev);
530530 shortrev[10] = '\0';
531531 if (obj->type == OBJ_COMMIT) {
ui-tree.c+1−1
@@ -287,7 +287,7 @@ void cgit_print_tree(const char *rev, char *path) · 286 unmodified lines
287287 walk_tree_ctx.curr_rev = xstrdup(rev);
288288
289289 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);
291291 goto cleanup;
292292 }
293293

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t