object: add clear_commit_marks_all()
Add a function for clearing the commit marks of all in-core commit objects. It's similar to clear_object_flags(), but more precise, since it leaves the other object types alone. It still has to iterate through them, though. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
5dee6d6f28
commit
4ad315fc99
11
object.c
11
object.c
@ -434,3 +434,14 @@ void clear_object_flags(unsigned flags)
|
||||
obj->flags &= ~flags;
|
||||
}
|
||||
}
|
||||
|
||||
void clear_commit_marks_all(unsigned int flags)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < obj_hash_size; i++) {
|
||||
struct object *obj = obj_hash[i];
|
||||
if (obj && obj->type == OBJ_COMMIT)
|
||||
obj->flags &= ~flags;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user