Commit Diff


commit - 0baddd91502bcd7aca9f72f5ded3609326c953cf
commit + eca70f98448556db333b7c61d37122488b572422
blob - 1455b6df378eb19d397ce2e3d3588af5a0256490
blob + 4ab44ac470c99d3b1842ebaef994127428153e04
--- lib/pack_create.c
+++ lib/pack_create.c
@@ -851,19 +851,6 @@ read_meta(struct got_pack_meta ***meta, int *nmeta,
 		if (obj_type != GOT_OBJ_TYPE_COMMIT)
 			continue;
 		err = load_commit(NULL, idset, id, repo,
-		    loose_obj_only, cancel_cb, cancel_arg);
-		if (err)
-			goto done;
-		if (progress_cb) {
-			err = progress_cb(progress_arg, 0L, nours,
-			    v.nmeta, 0, 0);
-			if (err)
-				goto done;
-		}
-	}
-
-	for (i = 0; i < nobj; i++) {
-		err = load_commit(&v, idset, ids[i], repo,
 		    loose_obj_only, cancel_cb, cancel_arg);
 		if (err)
 			goto done;
@@ -901,6 +888,19 @@ read_meta(struct got_pack_meta ***meta, int *nmeta,
 		}
 	}
 
+	for (i = 0; i < nobj; i++) {
+		err = load_commit(&v, idset, ids[i], repo,
+		    loose_obj_only, cancel_cb, cancel_arg);
+		if (err)
+			goto done;
+		if (progress_cb) {
+			err = progress_cb(progress_arg, 0L, nours,
+			    v.nmeta, 0, 0);
+			if (err)
+				goto done;
+		}
+	}
+
 	for (i = 0; i < nours; i++) {
 		struct got_object_id *id = ours[i];
 		int *cached_type;