Skip to content

Commit e49bf52

Browse files
committed
Merge branch 'jc/bundle-complete-notice' into maint
Running "git bundle verify" on a bundle that records a complete history said "it requires these 0 commits". * jc/bundle-complete-notice: tweak "bundle verify" of a complete history
2 parents cd733f4 + 8c3710f commit e49bf52

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

bundle.c

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,16 @@ int verify_bundle(struct bundle_header *header, int verbose)
188188
r->nr),
189189
r->nr);
190190
list_refs(r, 0, NULL);
191-
r = &header->prerequisites;
192-
printf_ln(Q_("The bundle requires this ref",
193-
"The bundle requires these %d refs",
194-
r->nr),
195-
r->nr);
196-
list_refs(r, 0, NULL);
191+
if (!r->nr) {
192+
printf_ln(_("The bundle records a complete history."));
193+
} else {
194+
r = &header->prerequisites;
195+
printf_ln(Q_("The bundle requires this ref",
196+
"The bundle requires these %d refs",
197+
r->nr),
198+
r->nr);
199+
list_refs(r, 0, NULL);
200+
}
197201
}
198202
return ret;
199203
}

0 commit comments

Comments
 (0)