]> granicus.if.org Git - cgit/commitdiff
git: update to v2.2.1
authorChristian Hesse <mail@eworm.de>
Fri, 19 Dec 2014 07:28:34 +0000 (00:28 -0700)
committerJason A. Donenfeld <Jason@zx2c4.com>
Wed, 24 Dec 2014 01:53:03 +0000 (18:53 -0700)
Update to git version v2.2.1, including API changes.

Signed-off-by: Christian Hesse <mail@eworm.de>
Makefile
cgit.c
git
ui-log.c
ui-repolist.c

index 6a8a125858bfbc641b8a68986cb4b7220ec60f5e..38bf59598306b2a479c8c1dc63b3a4967c783672 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ htmldir = $(docdir)
 pdfdir = $(docdir)
 mandir = $(prefix)/share/man
 SHA1_HEADER = <openssl/sha.h>
-GIT_VER = 2.0.4
+GIT_VER = 2.2.1
 GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.gz
 INSTALL = install
 COPYTREE = cp -r
diff --git a/cgit.c b/cgit.c
index db60107e7c2839fbad98a688db803cfb13602bca..796cb7fa9127ff2c9576e9567bc421fba9e498cb 100644 (file)
--- a/cgit.c
+++ b/cgit.c
@@ -457,7 +457,7 @@ static char *guess_defbranch(void)
        const char *ref;
        unsigned char sha1[20];
 
-       ref = resolve_ref_unsafe("HEAD", sha1, 0, NULL);
+       ref = resolve_ref_unsafe("HEAD", 0, sha1, NULL);
        if (!ref || !starts_with(ref, "refs/heads/"))
                return "master";
        return xstrdup(ref + 11);
diff --git a/git b/git
index 32f56600bb6ac6fc57183e79d2c1515dfa56672f..9b7cbb315923e61bb0c4297c701089f30e116750 160000 (submodule)
--- a/git
+++ b/git
@@ -1 +1 @@
-Subproject commit 32f56600bb6ac6fc57183e79d2c1515dfa56672f
+Subproject commit 9b7cbb315923e61bb0c4297c701089f30e116750
index ad2f5fcd8056ee546be136041ba70cb87517cf9e..657ff3cb76a835ae090452669c05ec49d904fc23 100644 (file)
--- a/ui-log.c
+++ b/ui-log.c
@@ -56,11 +56,11 @@ static void inspect_files(struct diff_filepair *pair)
 
 void show_commit_decorations(struct commit *commit)
 {
-       struct name_decoration *deco;
+       const struct name_decoration *deco;
        static char buf[1024];
 
        buf[sizeof(buf) - 1] = 0;
-       deco = lookup_decoration(&name_decoration, &commit->object);
+       deco = get_name_decoration(&commit->object);
        html("<span class='decoration'>");
        while (deco) {
                if (starts_with(deco->name, "refs/heads/")) {
index c2bcce177c23da9dabf9f5becbec3c71a0abc3c0..49c991f616a74a5fdf24f4c0c65d959c88275378 100644 (file)
@@ -17,16 +17,17 @@ static time_t read_agefile(char *path)
        time_t result;
        size_t size;
        char *buf;
-       static char buf2[64];
+       struct strbuf date_buf = STRBUF_INIT;
 
        if (readfile(path, &buf, &size))
                return -1;
 
-       if (parse_date(buf, buf2, sizeof(buf2)) > 0)
-               result = strtoul(buf2, NULL, 10);
+       if (parse_date(buf, &date_buf) == 0)
+               result = strtoul(date_buf.buf, NULL, 10);
        else
                result = 0;
        free(buf);
+       strbuf_release(&date_buf);
        return result;
 }