Re: [PATCH v2 08/10] fetch: fetch from an external bundle URI
- From
Victoria Dye <vdye@github.com>
- Date
- Jan 27, 2023, 19:18 UTC
- Message-ID
- <f219288e-93c8-7791-0b1c-b36f658f8697@github.com>
- In-Reply-To
- <59e57e049683e42248c270b3bfcad2d72769219d.1674487310.git.gitgitgadget@gmail.com>
Derrick Stolee via GitGitGadget wrote:
Show 15 quoted lines
> @@ -2109,6 +2110,7 @@ static int fetch_one(struct remote *remote, int argc, const char **argv,
> int cmd_fetch(int argc, const char **argv, const char *prefix)
> {
> int i;
> + const char *bundle_uri;
> struct string_list list = STRING_LIST_INIT_DUP;
> struct remote *remote = NULL;
> int result = 0;
> @@ -2194,6 +2196,11 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
> if (dry_run)
> write_fetch_head = 0;
>
> + if (!git_config_get_string_tmp("fetch.bundleuri", &bundle_uri)) {
> + if (fetch_bundle_uri(the_repository, bundle_uri, NULL))
> + warning(_("failed to fetch bundles from '%s'"), bundle_uri);nit: these conditions don't need to be nested and could instead be joined with '&&' in the outer 'if ()' (unless you plan to add more to this block in a future series - I didn't see anything in later patches here).
Everything else (tests, doc updates since the last version) looks good.