diff options
author | Derrick Stolee <derrickstolee@github.com> | 2022-03-22 18:28:38 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-03-23 21:13:59 +0100 |
commit | 017303eb483c48515095abcabf024101951f82ae (patch) | |
tree | 60d9902b90c566a6c5b65b9178509aa7d02334da /bundle.c | |
parent | pack-objects: parse --filter directly into revs.filter (diff) | |
download | git-017303eb483c48515095abcabf024101951f82ae.tar.xz git-017303eb483c48515095abcabf024101951f82ae.zip |
bundle: move capabilities to end of 'verify'
The 'filter' capability was added in 105c6f14a (bundle: parse filter
capability, 2022-03-09), but was added in a strange place in the 'git
bundle verify' output.
The tests for this show output like the following:
The bundle contains these 2 refs:
<COMMIT1> <REF1>
<COMMIT2> <REF2>
The bundle uses this filter: blob:none
The bundle records a complete history.
This looks very odd if we have a thin bundle that contains boundary
commits instead of a complete history:
The bundle contains these 2 refs:
<COMMIT1> <REF1>
<COMMIT2> <REF2>
The bundle uses this filter: blob:none
The bundle requires these 2 refs:
<COMMIT3>
<COMMIT4>
This separation between tip refs and boundary refs is unfortunate. Move
the filter capability output to the end of the output. Update the
documentation to match.
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'bundle.c')
-rw-r--r-- | bundle.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -267,11 +267,6 @@ int verify_bundle(struct repository *r, (uintmax_t)r->nr); list_refs(r, 0, NULL); - if (header->filter.choice) { - printf_ln("The bundle uses this filter: %s", - list_objects_filter_spec(&header->filter)); - } - r = &header->prerequisites; if (!r->nr) { printf_ln(_("The bundle records a complete history.")); @@ -282,6 +277,10 @@ int verify_bundle(struct repository *r, (uintmax_t)r->nr); list_refs(r, 0, NULL); } + + if (header->filter.choice) + printf_ln("The bundle uses this filter: %s", + list_objects_filter_spec(&header->filter)); } return ret; } |