summaryrefslogtreecommitdiff
path: root/shallow.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-05-06 22:10:09 +0000
committerJunio C Hamano <gitster@pobox.com>2017-05-08 15:12:57 +0900
commit1e43ed986775d8e8ecaef4dac8b98dcbae6298c1 (patch)
treeff277db9f9c9fbee8f4a87dc7f6cb8ea0c97a332 /shallow.c
parent7422ab50d1011b2b26b59bf11b91a1202618f3e5 (diff)
downloadgit-1e43ed986775d8e8ecaef4dac8b98dcbae6298c1.tar.gz
Convert remaining callers of lookup_commit_reference* to object_id
There are a small number of remaining callers of lookup_commit_reference and lookup_commit_reference_gently that still need to be converted to struct object_id. Convert these. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'shallow.c')
-rw-r--r--shallow.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/shallow.c b/shallow.c
index c520ae3aea..1327ee16fc 100644
--- a/shallow.c
+++ b/shallow.c
@@ -466,7 +466,7 @@ static uint32_t *paint_alloc(struct paint_info *info)
* UNINTERESTING or BOTTOM is hit. Set the id-th bit in ref_bitmap for
* all walked commits.
*/
-static void paint_down(struct paint_info *info, const unsigned char *sha1,
+static void paint_down(struct paint_info *info, const struct object_id *oid,
unsigned int id)
{
unsigned int i, nr;
@@ -475,7 +475,7 @@ static void paint_down(struct paint_info *info, const unsigned char *sha1,
size_t bitmap_size = st_mult(sizeof(uint32_t), bitmap_nr);
uint32_t *tmp = xmalloc(bitmap_size); /* to be freed before return */
uint32_t *bitmap = paint_alloc(info);
- struct commit *c = lookup_commit_reference_gently(sha1, 1);
+ struct commit *c = lookup_commit_reference_gently(oid->hash, 1);
if (!c)
return;
memset(bitmap, 0, bitmap_size);
@@ -604,7 +604,7 @@ void assign_shallow_commits_to_refs(struct shallow_info *info,
}
for (i = 0; i < ref->nr; i++)
- paint_down(&pi, ref->oid[i].hash, i);
+ paint_down(&pi, ref->oid + i, i);
if (used) {
int bitmap_size = ((pi.nr_bits + 31) / 32) * sizeof(uint32_t);