+static int mark_complete(const char *path, const unsigned char *sha1)
+{
+ struct object *obj = parse_object(sha1);
+ while (obj->type == tag_type) {
+ obj = ((struct tag *) obj)->tagged;
+ parse_object(obj->sha1);
+ }
+ if (obj->type == commit_type) {
+ obj->flags |= 1;
+ insert_by_date((struct commit *) obj, &complete);
+ }
+ return 0;
+}