diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-06-21 14:41:44 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-06-21 14:41:44 -0700 |
commit | cf5c75d3ea0541bf7fe8ef89938f54a491edc023 (patch) | |
tree | 59fcbebaa8375645bd67dc18065331ac7455b3d6 | |
parent | e40d724f853269094310e858371cabc4bfdbaeec (diff) | |
parent | 8c3710fd3011d75b9768749bfaf5ac2f31b96085 (diff) | |
download | git-cf5c75d3ea0541bf7fe8ef89938f54a491edc023.tar.gz git-cf5c75d3ea0541bf7fe8ef89938f54a491edc023.tar.xz |
Merge branch 'jc/bundle-complete-notice'
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
-rw-r--r-- | bundle.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -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; } |