#include "worktree.h"
#include "object-store.h"
#include "pack-bitmap.h"
+#include "pack-mtimes.h"
struct connectivity_progress {
struct progress *progress;
void *data)
{
struct object *obj;
+ timestamp_t mtime = p->mtime;
if (!want_recent_object(data, oid))
return 0;
if (obj && obj->flags & SEEN)
return 0;
- add_recent_object(oid, p, nth_packed_object_offset(p, pos), p->mtime, data);
+ if (p->is_cruft) {
+ if (load_pack_mtimes(p) < 0)
+ die(_("could not load cruft pack .mtimes"));
+ mtime = nth_packed_mtime(p, pos);
+ }
+ add_recent_object(oid, p, nth_packed_object_offset(p, pos), mtime, data);
return 0;
}