Skip to content

Commit

Permalink
bundle: Fix "verify" output if history is complete
Browse files Browse the repository at this point in the history
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 <git@cryptocrack.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Lukas Fleischer authored and Junio C Hamano committed Mar 7, 2013
1 parent 7e20105 commit 71ba6b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bundle.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ int verify_bundle(struct bundle_header *header, int verbose)
r->nr),
r->nr);
list_refs(r, 0, NULL);
r = &header->prerequisites;
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),
Expand Down

0 comments on commit 71ba6b1

Please sign in to comment.