diff options
author | Christian Hesse | 2015-07-28 10:42:01 +0200 |
---|---|---|
committer | Jason A. Donenfeld | 2015-08-12 14:09:05 +0200 |
commit | de83de276bef7509ab8255682595ad4521f3a193 (patch) | |
tree | e40e61142c47dea3536ca88d53648e82929b6719 | |
parent | Fix processing of repo.hide and repo.ignore (diff) | |
download | cgit-de83de276bef7509ab8255682595ad4521f3a193.tar.gz cgit-de83de276bef7509ab8255682595ad4521f3a193.zip |
git: update to v2.5.0
Update to git version v2.5.0. * Upstream commit 5455ee0573a22bb793a7083d593ae1ace909cd4c (Merge branch 'bc/object-id') changed API: for_each_ref() callback functions were taught to name the objects not with "unsigned char sha1[20]" but with "struct object_id". * Upstream commit dcf692625ac569fefbe52269061230f4fde10e47 (path.c: make get_pathname() call sites return const char *) Signed-off-by: Christian Hesse <mail@eworm.de>
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | cgit.c | 2 | ||||
-rw-r--r-- | cgit.h | 2 | ||||
m--------- | git | 0 | ||||
-rw-r--r-- | shared.c | 8 | ||||
-rw-r--r-- | ui-clone.c | 8 | ||||
-rw-r--r-- | ui-log.c | 4 | ||||
-rw-r--r-- | ui-shared.c | 2 |
8 files changed, 14 insertions, 14 deletions
diff --git a/Makefile b/Makefile index 1f84c00..65b4318 100644 --- a/Makefile +++ b/Makefile | |||
@@ -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.4.1 | 17 | GIT_VER = 2.5.0 |
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 |
diff --git a/cgit.c b/cgit.c index 8c9cfb5..ed02614 100644 --- a/cgit.c +++ b/cgit.c | |||
@@ -421,7 +421,7 @@ struct refmatch { | |||
421 | int match; | 421 | int match; |
422 | }; | 422 | }; |
423 | 423 | ||
424 | static int find_current_ref(const char *refname, const unsigned char *sha1, | 424 | static int find_current_ref(const char *refname, const struct object_id *oid, |
425 | int flags, void *cb_data) | 425 | int flags, void *cb_data) |
426 | { | 426 | { |
427 | struct refmatch *info; | 427 | struct refmatch *info; |
diff --git a/cgit.h b/cgit.h index 16f8092..db9a8eb 100644 --- a/cgit.h +++ b/cgit.h | |||
@@ -335,7 +335,7 @@ extern void strbuf_ensure_end(struct strbuf *sb, char c); | |||
335 | 335 | ||
336 | extern void cgit_add_ref(struct reflist *list, struct refinfo *ref); | 336 | extern void cgit_add_ref(struct reflist *list, struct refinfo *ref); |
337 | extern void cgit_free_reflist_inner(struct reflist *list); | 337 | extern void cgit_free_reflist_inner(struct reflist *list); |
338 | extern int cgit_refs_cb(const char *refname, const unsigned char *sha1, | 338 | extern int cgit_refs_cb(const char *refname, const struct object_id *oid, |
339 | int flags, void *cb_data); | 339 | int flags, void *cb_data); |
340 | 340 | ||
341 | extern void *cgit_free_commitinfo(struct commitinfo *info); | 341 | extern void *cgit_free_commitinfo(struct commitinfo *info); |
diff --git a/git b/git | |||
Subproject aaa7e0d7f8f003c0c8ab34f959083f6d191d44c | Subproject a17c56c056d5fea0843b429132904c429a90022 | ||
diff --git a/shared.c b/shared.c index a99173b..a83afcb 100644 --- a/shared.c +++ b/shared.c | |||
@@ -185,13 +185,13 @@ void cgit_add_ref(struct reflist *list, struct refinfo *ref) | |||
185 | list->refs[list->count++] = ref; | 185 | list->refs[list->count++] = ref; |
186 | } | 186 | } |
187 | 187 | ||
188 | static struct refinfo *cgit_mk_refinfo(const char *refname, const unsigned char *sha1) | 188 | static struct refinfo *cgit_mk_refinfo(const char *refname, const struct object_id *oid) |
189 | { | 189 | { |
190 | struct refinfo *ref; | 190 | struct refinfo *ref; |
191 | 191 | ||
192 | ref = xmalloc(sizeof (struct refinfo)); | 192 | ref = xmalloc(sizeof (struct refinfo)); |
193 | ref->refname = xstrdup(refname); | 193 | ref->refname = xstrdup(refname); |
194 | ref->object = parse_object(sha1); | 194 | ref->object = parse_object(oid->hash); |
195 | switch (ref->object->type) { | 195 | switch (ref->object->type) { |
196 | case OBJ_TAG: | 196 | case OBJ_TAG: |
197 | ref->tag = cgit_parse_tag((struct tag *)ref->object); | 197 | ref->tag = cgit_parse_tag((struct tag *)ref->object); |
@@ -239,11 +239,11 @@ void cgit_free_reflist_inner(struct reflist *list) | |||
239 | free(list->refs); | 239 | free(list->refs); |
240 | } | 240 | } |
241 | 241 | ||
242 | int cgit_refs_cb(const char *refname, const unsigned char *sha1, int flags, | 242 | int cgit_refs_cb(const char *refname, const struct object_id *oid, int flags, |
243 | void *cb_data) | 243 | void *cb_data) |
244 | { | 244 | { |
245 | struct reflist *list = (struct reflist *)cb_data; | 245 | struct reflist *list = (struct reflist *)cb_data; |
246 | struct refinfo *info = cgit_mk_refinfo(refname, sha1); | 246 | struct refinfo *info = cgit_mk_refinfo(refname, oid); |
247 | 247 | ||
248 | if (info) | 248 | if (info) |
249 | cgit_add_ref(list, info); | 249 | cgit_add_ref(list, info); |
diff --git a/ui-clone.c b/ui-clone.c index e35d3d3..e4ddd34 100644 --- a/ui-clone.c +++ b/ui-clone.c | |||
@@ -12,15 +12,15 @@ | |||
12 | #include "html.h" | 12 | #include "html.h" |
13 | #include "ui-shared.h" | 13 | #include "ui-shared.h" |
14 | 14 | ||
15 | static int print_ref_info(const char *refname, const unsigned char *sha1, | 15 | static int print_ref_info(const char *refname, const struct object_id *oid, |
16 | int flags, void *cb_data) | 16 | int flags, void *cb_data) |
17 | { | 17 | { |
18 | struct object *obj; | 18 | struct object *obj; |
19 | 19 | ||
20 | if (!(obj = parse_object(sha1))) | 20 | if (!(obj = parse_object(oid->hash))) |
21 | return 0; | 21 | return 0; |
22 | 22 | ||
23 | htmlf("%s\t%s\n", sha1_to_hex(sha1), refname); | 23 | htmlf("%s\t%s\n", oid_to_hex(oid), refname); |
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; |
@@ -50,7 +50,7 @@ static void print_pack_info(void) | |||
50 | } | 50 | } |
51 | } | 51 | } |
52 | 52 | ||
53 | static void send_file(char *path) | 53 | static void send_file(const char *path) |
54 | { | 54 | { |
55 | struct stat st; | 55 | struct stat st; |
56 | 56 | ||
diff --git a/ui-log.c b/ui-log.c index 32b4c47..8028b27 100644 --- a/ui-log.c +++ b/ui-log.c | |||
@@ -249,11 +249,11 @@ static void print_commit(struct commit *commit, struct rev_info *revs) | |||
249 | 249 | ||
250 | static const char *disambiguate_ref(const char *ref, int *must_free_result) | 250 | static const char *disambiguate_ref(const char *ref, int *must_free_result) |
251 | { | 251 | { |
252 | unsigned char sha1[20]; | 252 | struct object_id oid; |
253 | struct strbuf longref = STRBUF_INIT; | 253 | struct strbuf longref = STRBUF_INIT; |
254 | 254 | ||
255 | strbuf_addf(&longref, "refs/heads/%s", ref); | 255 | strbuf_addf(&longref, "refs/heads/%s", ref); |
256 | if (get_sha1(longref.buf, sha1) == 0) { | 256 | if (get_sha1(longref.buf, oid.hash) == 0) { |
257 | *must_free_result = 1; | 257 | *must_free_result = 1; |
258 | return strbuf_detach(&longref, NULL); | 258 | return strbuf_detach(&longref, NULL); |
259 | } | 259 | } |
diff --git a/ui-shared.c b/ui-shared.c index ac5a287..e755c92 100644 --- a/ui-shared.c +++ b/ui-shared.c | |||
@@ -792,7 +792,7 @@ void cgit_add_clone_urls(void (*fn)(const char *)) | |||
792 | add_clone_urls(fn, ctx.cfg.clone_prefix, ctx.repo->url); | 792 | add_clone_urls(fn, ctx.cfg.clone_prefix, ctx.repo->url); |
793 | } | 793 | } |
794 | 794 | ||
795 | static int print_branch_option(const char *refname, const unsigned char *sha1, | 795 | static int print_branch_option(const char *refname, const struct object_id *oid, |
796 | int flags, void *cb_data) | 796 | int flags, void *cb_data) |
797 | { | 797 | { |
798 | char *name = (char *)refname; | 798 | char *name = (char *)refname; |