From cd8888452cd0e09c9efdc22da729023ae255b54b Mon Sep 17 00:00:00 2001 From: René Scharfe Date: Sat, 31 Oct 2020 13:46:08 +0100 Subject: object: allow clear_commit_marks_all to handle any repo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow callers to specify the repository to use. Rename the function to repo_clear_commit_marks to document its new scope. No functional change intended. Signed-off-by: René Scharfe Signed-off-by: Junio C Hamano --- object.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'object.c') diff --git a/object.c b/object.c index 3257518656..05544bc92b 100644 --- a/object.c +++ b/object.c @@ -453,12 +453,12 @@ void clear_object_flags(unsigned flags) } } -void clear_commit_marks_all(unsigned int flags) +void repo_clear_commit_marks(struct repository *r, unsigned int flags) { int i; - for (i = 0; i < the_repository->parsed_objects->obj_hash_size; i++) { - struct object *obj = the_repository->parsed_objects->obj_hash[i]; + for (i = 0; i < r->parsed_objects->obj_hash_size; i++) { + struct object *obj = r->parsed_objects->obj_hash[i]; if (obj && obj->type == OBJ_COMMIT) obj->flags &= ~flags; } -- cgit v1.2.3