Re: [PATCH v3 12/12] clone: fail gracefully when cloning filtered bundle
- From
Derrick Stolee <derrickstolee@github.com>
- Date
- Mar 8, 2022, 16:10 UTC
- Message-ID
- <d9e6e3bb-b2ef-dbf4-6969-620b58727115@github.com>
- In-Reply-To
- <805e1d1172210c6a39b33edcb2cd6d21b754f821.1646750359.git.gitgitgadget@gmail.com>
On 3/8/2022 9:39 AM, Derrick Stolee via GitGitGadget wrote:
> + if (is_bundle) {
> + struct bundle_header header = { 0 };
> + int fd = read_bundle_header(path, &header);
> + int has_filter = header.filter.choice != LOFC_DISABLED;Of course, as I was sending an email replying to What's Cooking, I realized that I missed one of the suggestions, which is fixed with this diff:
--- >8 ---
diff --git a/builtin/clone.c b/builtin/clone.c index 623a5040b1..e57504c2aa 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -1140,7 +1140,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix) transport->cloning = 1; if (is_bundle) { - struct bundle_header header = { 0 }; + struct bundle_header header = BUNDLE_HEADER_INIT; int fd = read_bundle_header(path, &header); int has_filter = header.filter.choice != LOFC_DISABLED;