implement fetching of moved submodules
[gitweb.git] / builtin / fsck.c
index 0ab13848a4937e826a5881d774d7a50c2526641a..56afe405b8072b3099a23661ac586f673e54ff0e 100644 (file)
@@ -15,6 +15,7 @@
 #include "progress.h"
 #include "streaming.h"
 #include "decorate.h"
+#include "packfile.h"
 
 #define REACHABLE 0x0001
 #define SEEN      0x0002
@@ -181,12 +182,7 @@ static int traverse_reachable(void)
        if (show_progress)
                progress = start_delayed_progress(_("Checking connectivity"), 0);
        while (pending.nr) {
-               struct object_array_entry *entry;
-               struct object *obj;
-
-               entry = pending.objects + --pending.nr;
-               obj = entry->item;
-               result |= traverse_one_object(obj);
+               result |= traverse_one_object(object_array_pop(&pending));
                display_progress(progress, ++nr);
        }
        stop_progress(&progress);