Re: [PATCH v3 12/12] clone: fail gracefully when cloning filtered bundle
From: Derrick Stolee <hidden>
Date: 2022-03-08 16:10:50
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Derrick Stolee <hidden>
Date: 2022-03-08 16:10:50
Subsystem:
the rest · Maintainer:
Linus Torvalds
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;