Skip to content

Commit 71ba6b1

Browse files
Lukas Fleischergitster
authored andcommitted
bundle: Fix "verify" output if history is complete
A more informative message for "complete" bundles was added in commit 8c3710f (tweak "bundle verify" of a complete history, 2012-06-04). However, the prerequisites ref list is currently read *after* we check if it equals zero, which means we never actually use the number of prerequisite refs to decide when to print the newly introduced message. The code incorrectly uses the number of references recorded in the bundle instead. Signed-off-by: Lukas Fleischer <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7e20105 commit 71ba6b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bundle.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,10 @@ 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;
191192
if (!r->nr) {
192193
printf_ln(_("The bundle records a complete history."));
193194
} else {
194-
r = &header->prerequisites;
195195
printf_ln(Q_("The bundle requires this ref",
196196
"The bundle requires these %d refs",
197197
r->nr),

0 commit comments

Comments
 (0)