Re: [PATCH v3 10/11] bundle-uri: download bundles from an advertised list
- From
Jeff King <peff@peff.net>
- Date
- Dec 7, 2022, 12:57 UTC
- Message-ID
- <Y5CNo5kyByIHDVYh@coredump.intra.peff.net>
- In-Reply-To
- <69bf154bec63a22df8e5eac89f975625ce73c8ac.1670262639.git.gitgitgadget@gmail.com>
On Mon, Dec 05, 2022 at 05:50:38PM +0000, Derrick Stolee via GitGitGadget wrote:
Show 20 quoted lines
> +int fetch_bundle_list(struct repository *r, const char *uri, struct bundle_list *list)
> +{
> + int result;
> + struct bundle_list global_list;
> +
> + init_bundle_list(&global_list);
> +
> + /* If a bundle is added to this global list, then it is required. */
> + global_list.mode = BUNDLE_MODE_ALL;
> +
> + if ((result = download_bundle_list(r, list, &global_list, 0)))
> + goto cleanup;
> +
> + result = unbundle_all_bundles(r, &global_list);
> +
> +cleanup:
> + for_all_bundles_in_list(&global_list, unlink_bundle, NULL);
> + clear_bundle_list(&global_list);
> + return result;
> +}The "uri" parameter in this function is unused. I'm not sure if that's indicative of a bug or missing feature (e.g., could it be the base for a relative url?), or if it's just a leftover from development.
If the latter, I'm happy to add it to my list of cleanups.
There are a couple other unused parameters in this series, too, but they are all in virtual functions and must be kept. I'll add them to my list of annotations.
-Peff