Commit Diff


commit - 99fe3033f2c5c27a510a69c329fb1a542c4620cf
commit + 046f76c30e642757d0d52b64eabd263c7c206fec
blob - ae96825b2544aed0b77b6b83a68e89e97d24c0f1
blob + 7f48facde10d3f583396ed2c3e933d910b8ab006
--- lib/pack_create.c
+++ lib/pack_create.c
@@ -1932,6 +1932,9 @@ got_pack_create(uint8_t *packsha1, int packfd, FILE *d
 			goto done;
 	}
 
+	/* Pinned pack may have moved to different cache slot. */
+	reuse_pack = got_repo_get_pinned_pack(repo);
+
 	err = genpack(packsha1, packfd, reuse_pack, delta_cache, deltify.meta,
 	    deltify.nmeta, reuse.meta, reuse.nmeta, ncolored, nfound, ntrees,
 	    nours, repo, force_refdelta, progress_cb, progress_arg, rl,