for_each_reflog_ent(): extract a helper to process a single entry
[gitweb.git] / bundle.c
index 8d31b98f58b9e9bf156615130ec80684f788fcaa..8d12816b9d0bc682ed9c019a7a5d5cec4b859171 100644 (file)
--- a/bundle.c
+++ b/bundle.c
@@ -188,12 +188,16 @@ int verify_bundle(struct bundle_header *header, int verbose)
                             r->nr),
                          r->nr);
                list_refs(r, 0, NULL);
-               r = &header->prerequisites;
-               printf_ln(Q_("The bundle requires this ref",
-                            "The bundle requires these %d refs",
-                            r->nr),
-                         r->nr);
-               list_refs(r, 0, NULL);
+               if (!r->nr) {
+                       printf_ln(_("The bundle records a complete history."));
+               } else {
+                       r = &header->prerequisites;
+                       printf_ln(Q_("The bundle requires this ref",
+                                    "The bundle requires these %d refs",
+                                    r->nr),
+                                 r->nr);
+                       list_refs(r, 0, NULL);
+               }
        }
        return ret;
 }