Commit Diff


commit - a086872af94cfb4c16769d9255ca2211552c5317
commit + 0b819c411db361d628205284db65d324fa0f6811
blob - 1237219701c740a2888026be01093e81996c1f27
blob + 230993d12577872f9b3c09c52a605e9d0ee45bd5
--- lib/pack_create.c
+++ lib/pack_create.c
@@ -837,16 +837,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,
@@ -1165,8 +1155,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;
@@ -1335,11 +1324,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;