summaryrefslogtreecommitdiff
path: root/upload-pack.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2015-11-10 02:22:29 +0000
committerJeff King <peff@peff.net>2015-11-20 08:02:05 -0500
commited1c9977cb1b63e4270ad8bdf967a2d02580aa08 (patch)
treef5b52ccae09103672c62c1c11ff0bddc78199829 /upload-pack.c
parentf2fd0760f62e79609fef7bfd7ecebb002e8e4ced (diff)
downloadgit-ed1c9977cb1b63e4270ad8bdf967a2d02580aa08.tar.gz
Remove get_object_hash.
Convert all instances of get_object_hash to use an appropriate reference to the hash member of the oid member of struct object. This provides no functional change, as it is essentially a macro substitution. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'upload-pack.c')
-rw-r--r--upload-pack.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/upload-pack.c b/upload-pack.c
index 3a6352a1fc..b3f6653ffd 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -324,7 +324,7 @@ static int reachable(struct commit *want)
break;
}
if (!commit->object.parsed)
- parse_object(get_object_hash(commit->object));
+ parse_object(commit->object.oid.hash);
if (commit->object.flags & REACHABLE)
continue;
commit->object.flags |= REACHABLE;
@@ -647,7 +647,7 @@ static void receive_needs(void)
if (!(object->flags & (CLIENT_SHALLOW|NOT_SHALLOW))) {
packet_write(1, "shallow %s",
oid_to_hex(&object->oid));
- register_shallow(get_object_hash(*object));
+ register_shallow(object->oid.hash);
shallow_nr++;
}
result = result->next;
@@ -661,7 +661,7 @@ static void receive_needs(void)
oid_to_hex(&object->oid));
object->flags &= ~CLIENT_SHALLOW;
/* make sure the real parents are parsed */
- unregister_shallow(get_object_hash(*object));
+ unregister_shallow(object->oid.hash);
object->parsed = 0;
parse_commit_or_die((struct commit *)object);
parents = ((struct commit *)object)->parents;
@@ -673,14 +673,14 @@ static void receive_needs(void)
add_object_array(object, NULL, &extra_edge_obj);
}
/* make sure commit traversal conforms to client */
- register_shallow(get_object_hash(*object));
+ register_shallow(object->oid.hash);
}
packet_flush(1);
} else
if (shallows.nr > 0) {
int i;
for (i = 0; i < shallows.nr; i++)
- register_shallow(get_object_hash(*shallows.objects[i].item));
+ register_shallow(shallows.objects[i].item->oid.hash);
}
shallow_nr += shallows.nr;