pack-bitmap: implement bitmap_writer_has_bitmapped_object_id()
Prepare to implement pseudo-merge bitmap selection by implementing a necessary new function, `bitmap_writer_has_bitmapped_object_id()`. This function returns whether or not the bitmap_writer selected the given object ID for bitmapping. This will allow the pseudo-merge machinery to reject candidates for pseudo-merges if they have already been selected as an ordinary bitmap tip. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
0d41b18317
commit
245a7f2e01
@ -130,6 +130,12 @@ void bitmap_writer_build_type_index(struct bitmap_writer *writer,
|
||||
}
|
||||
}
|
||||
|
||||
int bitmap_writer_has_bitmapped_object_id(struct bitmap_writer *writer,
|
||||
const struct object_id *oid)
|
||||
{
|
||||
return kh_get_oid_map(writer->bitmaps, *oid) != kh_end(writer->bitmaps);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute the actual bitmaps
|
||||
*/
|
||||
|
Reference in New Issue
Block a user