summaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-10-30 06:43:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-10-30 06:43:42 (GMT)
commitd829d491eebddc2eefcaa9279ac4b67c7eefbd52 (patch)
treecb639ce3f677d995b42a3537d00ee74b8b4797c6 /transport.c
parent7dc3e5a3be73cf0cbb5f3af6d8e3bb10c70cca3e (diff)
parent0d7c419a94b7524ac854d5a6002b7541abab4f12 (diff)
downloadgit-d829d491eebddc2eefcaa9279ac4b67c7eefbd52.zip
git-d829d491eebddc2eefcaa9279ac4b67c7eefbd52.tar.gz
git-d829d491eebddc2eefcaa9279ac4b67c7eefbd52.tar.bz2
Merge branch 'bc/hash-transition-part-15'
More codepaths are moving away from hardcoded hash sizes. * bc/hash-transition-part-15: rerere: convert to use the_hash_algo submodule: make zero-oid comparison hash function agnostic apply: rename new_sha1_prefix and old_sha1_prefix apply: replace hard-coded constants tag: express constant in terms of the_hash_algo transport: use parse_oid_hex instead of a constant upload-pack: express constants in terms of the_hash_algo refs/packed-backend: express constants using the_hash_algo packfile: express constants in terms of the_hash_algo pack-revindex: express constants in terms of the_hash_algo builtin/fetch-pack: remove constants with parse_oid_hex builtin/mktree: remove hard-coded constant builtin/repack: replace hard-coded constants pack-bitmap-write: use GIT_MAX_RAWSZ for allocation object_id.cocci: match only expressions of type 'struct object_id'
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/transport.c b/transport.c
index f4ffbd9..01ce11a 100644
--- a/transport.c
+++ b/transport.c
@@ -1413,9 +1413,9 @@ 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;