summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--transport.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/transport.c b/transport.c
index 1c76d64..44b9ddf 100644
--- a/transport.c
+++ b/transport.c
@@ -1346,15 +1346,16 @@ static void read_alternate_refs(const char *path,
fh = xfdopen(cmd.out, "r");
while (strbuf_getline_lf(&line, fh) != EOF) {
struct object_id oid;
+ const char *p;
- if (get_oid_hex(line.buf, &oid) ||
- line.buf[GIT_SHA1_HEXSZ] != ' ') {
+ if (parse_oid_hex(line.buf, &oid, &p) ||
+ *p != ' ') {
warning(_("invalid line while parsing alternate refs: %s"),
line.buf);
break;
}
- cb(line.buf + GIT_SHA1_HEXSZ + 1, &oid, data);
+ cb(p + 1, &oid, data);
}
fclose(fh);