diff mbox series

[02/17] upload-pack: rename a "sha1" variable to "oid"

Message ID 20190620074054.GB3713@sigill.intra.peff.net (mailing list archive)
State New, archived
Headers show
Series drop non-object_id hashing | expand

Commit Message

Jeff King June 20, 2019, 7:40 a.m. UTC
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>
---
 upload-pack.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/upload-pack.c b/upload-pack.c
index 4d2129e7fc..d9a62adef0 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -528,13 +528,13 @@  static int get_reachable_list(struct object_array *src,
 		return -1;
 
 	while ((i = read_in_full(cmd.out, namebuf, hexsz + 1)) == hexsz + 1) {
-		struct object_id sha1;
+		struct object_id oid;
 		const char *p;
 
-		if (parse_oid_hex(namebuf, &sha1, &p) || *p != '\n')
+		if (parse_oid_hex(namebuf, &oid, &p) || *p != '\n')
 			break;
 
-		o = lookup_object(the_repository, sha1.hash);
+		o = lookup_object(the_repository, oid.hash);
 		if (o && o->type == OBJ_COMMIT) {
 			o->flags &= ~TMP_MARK;
 		}