diff options
author | Christian Hesse | 2014-12-19 00:28:34 -0700 |
---|---|---|
committer | Jason A. Donenfeld | 2014-12-23 18:53:03 -0700 |
commit | 17838ec6304198811df97402f11c185f8f0e10bd (patch) | |
tree | bf462dcdb2b974d45c72b8f4fb559dfde1b51027 | |
parent | 10c5680efb02b534108b174c0967d08ae3e46927 (diff) | |
download | cgit-17838ec6304198811df97402f11c185f8f0e10bd.tar.gz cgit-17838ec6304198811df97402f11c185f8f0e10bd.tar.bz2 cgit-17838ec6304198811df97402f11c185f8f0e10bd.zip |
git: update to v2.2.1
Update to git version v2.2.1, including API changes.
Signed-off-by: Christian Hesse <mail@eworm.de>
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | cgit.c | 2 | ||||
m--------- | git | 0 | ||||
-rw-r--r-- | ui-log.c | 4 | ||||
-rw-r--r-- | ui-repolist.c | 7 |
5 files changed, 8 insertions, 7 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.0.4 | 17 | GIT_VER = 2.2.1 |
18 | GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.gz | 18 | GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.gz |
19 | INSTALL = install | 19 | INSTALL = install |
20 | COPYTREE = cp -r | 20 | COPYTREE = cp -r |
@@ -457,7 +457,7 @@ static char *guess_defbranch(void) | |||
457 | const char *ref; | 457 | const char *ref; |
458 | unsigned char sha1[20]; | 458 | unsigned char sha1[20]; |
459 | 459 | ||
460 | ref = resolve_ref_unsafe("HEAD", sha1, 0, NULL); | 460 | ref = resolve_ref_unsafe("HEAD", 0, sha1, NULL); |
461 | if (!ref || !starts_with(ref, "refs/heads/")) | 461 | if (!ref || !starts_with(ref, "refs/heads/")) |
462 | return "master"; | 462 | return "master"; |
463 | return xstrdup(ref + 11); | 463 | return xstrdup(ref + 11); |
diff --git a/git b/git | |||
Subproject 32f56600bb6ac6fc57183e79d2c1515dfa56672 | Subproject 9b7cbb315923e61bb0c4297c701089f30e11675 | ||
@@ -56,11 +56,11 @@ static void inspect_files(struct diff_filepair *pair) | |||
56 | 56 | ||
57 | void show_commit_decorations(struct commit *commit) | 57 | void show_commit_decorations(struct commit *commit) |
58 | { | 58 | { |
59 | struct name_decoration *deco; | 59 | const struct name_decoration *deco; |
60 | static char buf[1024]; | 60 | static char buf[1024]; |
61 | 61 | ||
62 | buf[sizeof(buf) - 1] = 0; | 62 | buf[sizeof(buf) - 1] = 0; |
63 | deco = lookup_decoration(&name_decoration, &commit->object); | 63 | deco = get_name_decoration(&commit->object); |
64 | html("<span class='decoration'>"); | 64 | html("<span class='decoration'>"); |
65 | while (deco) { | 65 | while (deco) { |
66 | if (starts_with(deco->name, "refs/heads/")) { | 66 | if (starts_with(deco->name, "refs/heads/")) { |
diff --git a/ui-repolist.c b/ui-repolist.c index c2bcce1..49c991f 100644 --- a/ui-repolist.c +++ b/ui-repolist.c | |||
@@ -17,16 +17,17 @@ static time_t read_agefile(char *path) | |||
17 | time_t result; | 17 | time_t result; |
18 | size_t size; | 18 | size_t size; |
19 | char *buf; | 19 | char *buf; |
20 | static char buf2[64]; | 20 | struct strbuf date_buf = STRBUF_INIT; |
21 | 21 | ||
22 | if (readfile(path, &buf, &size)) | 22 | if (readfile(path, &buf, &size)) |
23 | return -1; | 23 | return -1; |
24 | 24 | ||
25 | if (parse_date(buf, buf2, sizeof(buf2)) > 0) | 25 | if (parse_date(buf, &date_buf) == 0) |
26 | result = strtoul(buf2, NULL, 10); | 26 | result = strtoul(date_buf.buf, NULL, 10); |
27 | else | 27 | else |
28 | result = 0; | 28 | result = 0; |
29 | free(buf); | 29 | free(buf); |
30 | strbuf_release(&date_buf); | ||
30 | return result; | 31 | return result; |
31 | } | 32 | } |
32 | 33 | ||