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>
Christian Hesse mail@eworm.de
Tue, 28 Jul 2015 10:42:01 +0200
7 files changed,
14 insertions(+),
14 deletions(-)
M
cgit.h
→
cgit.h
@@ -335,7 +335,7 @@ extern void strbuf_ensure_end(struct strbuf *sb, char c);
extern void cgit_add_ref(struct reflist *list, struct refinfo *ref); extern void cgit_free_reflist_inner(struct reflist *list); -extern int cgit_refs_cb(const char *refname, const unsigned char *sha1, +extern int cgit_refs_cb(const char *refname, const struct object_id *oid, int flags, void *cb_data); extern void *cgit_free_commitinfo(struct commitinfo *info);
M
ui-clone.c
→
ui-clone.c
@@ -12,15 +12,15 @@ #include "ui-clone.h"
#include "html.h" #include "ui-shared.h" -static int print_ref_info(const char *refname, const unsigned char *sha1, +static int print_ref_info(const char *refname, const struct object_id *oid, int flags, void *cb_data) { struct object *obj; - if (!(obj = parse_object(sha1))) + if (!(obj = parse_object(oid->hash))) return 0; - htmlf("%s\t%s\n", sha1_to_hex(sha1), refname); + htmlf("%s\t%s\n", oid_to_hex(oid), refname); if (obj->type == OBJ_TAG) { if (!(obj = deref_tag(obj, refname, 0))) return 0;@@ -50,7 +50,7 @@ }
} } -static void send_file(char *path) +static void send_file(const char *path) { struct stat st;
M
ui-log.c
→
ui-log.c
@@ -249,11 +249,11 @@ }
static const char *disambiguate_ref(const char *ref, int *must_free_result) { - unsigned char sha1[20]; + struct object_id oid; struct strbuf longref = STRBUF_INIT; strbuf_addf(&longref, "refs/heads/%s", ref); - if (get_sha1(longref.buf, sha1) == 0) { + if (get_sha1(longref.buf, oid.hash) == 0) { *must_free_result = 1; return strbuf_detach(&longref, NULL); }