Message ID | 1b2130426bd7bd6c0bf5c56be2bf66a4d81f0b27.1647970119.git.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 017303eb483c48515095abcabf024101951f82ae |
Headers | show |
Series | Partial bundle follow ups | expand |
On 23/03/22 00.28, Derrick Stolee via GitGitGadget wrote: > - Information about additional capabilities, such as "object filter", > - is printed. See "Capabilities" in link:technical/bundle-format.html > - for more information. Finally, 'git bundle' prints a list of > - missing commits, if any. The exit code is zero for success, but > - will be nonzero if the bundle file is invalid. > + Then, 'git bundle' prints a list of missing commits, if any. > + Finally, information about additional capabilities, such as "object > + filter", is printed. See "Capabilities" in link:technical/bundle-format.html > + for more information. The exit code is zero for success, but will > + be nonzero if the bundle file is invalid. That means, nonzero exit code for corrupted bundle files, right?
On 3/23/2022 3:08 AM, Bagas Sanjaya wrote: > On 23/03/22 00.28, Derrick Stolee via GitGitGadget wrote: > >> - Information about additional capabilities, such as "object filter", >> - is printed. See "Capabilities" in link:technical/bundle-format.html >> - for more information. Finally, 'git bundle' prints a list of >> - missing commits, if any. The exit code is zero for success, but >> - will be nonzero if the bundle file is invalid. >> + Then, 'git bundle' prints a list of missing commits, if any. >> + Finally, information about additional capabilities, such as "object >> + filter", is printed. See "Capabilities" in link:technical/bundle-format.html >> + for more information. The exit code is zero for success, but will >> + be nonzero if the bundle file is invalid. > > That means, nonzero exit code for corrupted bundle files, right? Yes. That last sentence is unchanged from the earlier version (modulo line wrapping). Thanks, -Stolee
diff --git a/Documentation/git-bundle.txt b/Documentation/git-bundle.txt index ac4c4352aae..7685b570455 100644 --- a/Documentation/git-bundle.txt +++ b/Documentation/git-bundle.txt @@ -75,11 +75,11 @@ verify <file>:: cleanly to the current repository. This includes checks on the bundle format itself as well as checking that the prerequisite commits exist and are fully linked in the current repository. - Information about additional capabilities, such as "object filter", - is printed. See "Capabilities" in link:technical/bundle-format.html - for more information. Finally, 'git bundle' prints a list of - missing commits, if any. The exit code is zero for success, but - will be nonzero if the bundle file is invalid. + Then, 'git bundle' prints a list of missing commits, if any. + Finally, information about additional capabilities, such as "object + filter", is printed. See "Capabilities" in link:technical/bundle-format.html + for more information. The exit code is zero for success, but will + be nonzero if the bundle file is invalid. list-heads <file>:: Lists the references defined in the bundle. If followed by a diff --git a/bundle.c b/bundle.c index e359370cfcd..276b55f8ce2 100644 --- a/bundle.c +++ b/bundle.c @@ -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; } diff --git a/t/t6020-bundle-misc.sh b/t/t6020-bundle-misc.sh index ed95d195427..c4ab1367afc 100755 --- a/t/t6020-bundle-misc.sh +++ b/t/t6020-bundle-misc.sh @@ -510,8 +510,8 @@ do <TAG-2> refs/tags/v2 <TAG-3> refs/tags/v3 <COMMIT-P> HEAD - The bundle uses this filter: $filter The bundle records a complete history. + The bundle uses this filter: $filter EOF test_cmp expect actual &&