Commit Diff


commit - ffd9dda732b61657f28e1182458b60d3b27b65bf
commit + 912a163eb6901d0a797d05fb21b34bc30031eb39
blob - 63e87912816262a1fbf2409860698652afca6344
blob + f72e0aef68bef2ed6581aa52ad094c2503f1da86
--- lib/pack_create.c
+++ lib/pack_create.c
@@ -838,16 +838,6 @@ search_packidx(int *found, struct got_object_id *id,
 		err = NULL;
 	return err;
 }
-
-static const int obj_types[] = {
-	GOT_OBJ_TYPE_ANY,
-	GOT_OBJ_TYPE_COMMIT,
-	GOT_OBJ_TYPE_TREE,
-	GOT_OBJ_TYPE_BLOB,
-	GOT_OBJ_TYPE_TAG,
-	GOT_OBJ_TYPE_OFFSET_DELTA,
-	GOT_OBJ_TYPE_REF_DELTA
-};
 
 static const struct got_error *
 add_object(int want_meta, struct got_object_idset *idset,
@@ -1166,8 +1156,7 @@ drop_commit(struct got_object_idset *keep, struct got_
 			continue;
 		}
 
-		err = got_object_idset_add(drop, qid->id,
-		    (void *)&obj_types[GOT_OBJ_TYPE_COMMIT]);
+		err = got_object_idset_add(drop, qid->id, NULL);
 		if (err) {
 			got_object_qid_free(qid);
 			break;
@@ -1336,11 +1325,9 @@ findtwixt(struct got_object_id ***res, int *nres, int 
 				goto done;
 			}
 			if (qcolor == COLOR_KEEP)
-				err = got_object_idset_add(keep, id,
-				    (void *)&obj_types[GOT_OBJ_TYPE_COMMIT]);
+				err = got_object_idset_add(keep, id, NULL);
 			else
-				err = got_object_idset_add(drop, id,
-				    (void *)&obj_types[GOT_OBJ_TYPE_COMMIT]);
+				err = got_object_idset_add(drop, id, NULL);
 			if (err) {
 				free(id);
 				goto done;