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
14pdfdir = $(docdir)14pdfdir = $(docdir)
15mandir = $(prefix)/share/man15mandir = $(prefix)/share/man
16SHA1_HEADER = <openssl/sha.h>16SHA1_HEADER = <openssl/sha.h>
17GIT_VER = 2.6.117GIT_VER = 2.7.0
18GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.gz18GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.gz
19INSTALL = install19INSTALL = install
20COPYTREE = cp -r20COPYTREE = cp -r
git+1−1
@@ -1 +1 @@
1Subproject commit 22f698cb188243b313e024d618283e0293e371401Subproject commit 754884255bb580df159e58defa81cdd30b5c430c
parsing.c+2−2
@@ -139,7 +139,7 @@ struct commitinfo *cgit_parse_commit(struct commit *commit) · 138 unmodified lines
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) · 53 unmodified lines
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
shared.c+2−2
@@ -402,8 +402,8 @@ void cgit_diff_commit(struct commit *commit, filepair_fn fn, const char *prefix) · 401 unmodified lines
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
ui-atom.c+1−1
@@ -19,7 +19,7 @@ static void add_entry(struct commit *commit, const char *host) · 18 unmodified lines
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);
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
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}
ui-commit.c+6−6
@@ -69,14 +69,14 @@ void cgit_print_commit(char *hex, const char *prefix) · 68 unmodified lines
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) · 2 unmodified lines
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) · 2 unmodified lines
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) · 1 unmodified line
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) · 26 unmodified lines
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 else139 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);
ui-diff.c+3−3
@@ -413,7 +413,7 @@ void cgit_print_diff(const char *new_rev, const char *old_rev, · 412 unmodified lines
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, · 2 unmodified lines
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, · 5 unmodified lines
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 }
ui-log.c+6−6
@@ -82,14 +82,14 @@ void show_commit_decorations(struct commit *commit) · 81 unmodified lines
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) · 52 unmodified lines
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) · 77 unmodified lines
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) · 29 unmodified lines
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);
ui-patch.c+1−1
@@ -48,7 +48,7 @@ void cgit_print_patch(const char *new_rev, const char *old_rev, · 47 unmodified lines
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 }
ui-plain.c+1−1
@@ -183,7 +183,7 @@ void cgit_print_plain(void) · 182 unmodified lines
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 else189 else
ui-shared.c+1−1
@@ -525,7 +525,7 @@ void cgit_object_link(struct object *obj) · 524 unmodified lines
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) {
ui-tree.c+1−1
@@ -287,7 +287,7 @@ void cgit_print_tree(const char *rev, char *path) · 286 unmodified lines
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

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