upload-pack: rename a "sha1" variable to "oid"
This variable is a "struct object_id", but uses the old-style name "sha1". Let's call it oid to match more modern code (and make it clear that it can handle any algorithm, since it uses parse_oid_hex() properly). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
Jun 20, 2019 at 03:40 UTC
62b89d43e2eab692aaa65393de901e4119eddbb8
1 file changed
+3
-3
upload-pack.c
+3
-3
@@ -528,13 +528,13 @@ static int get_reachable_list(struct object_array *src,
528
return -1;
529
530
while ((i = read_in_full(cmd.out, namebuf, hexsz + 1)) == hexsz + 1) {
531
- struct object_id sha1;
531
+ struct object_id oid;
532
const char *p;
533
534
- if (parse_oid_hex(namebuf, &sha1, &p) || *p != '\n')
534
+ if (parse_oid_hex(namebuf, &oid, &p) || *p != '\n')
535
break;
536
537
- o = lookup_object(the_repository, sha1.hash);
537
+ o = lookup_object(the_repository, oid.hash);
538
if (o && o->type == OBJ_COMMIT) {
539
o->flags &= ~TMP_MARK;
540
}