pull: Fix some whitespace and a comment
This commit is contained in:
parent
8459d52fbc
commit
2709da4360
|
|
@ -4104,24 +4104,25 @@ ostree_repo_pull_with_options (OstreeRepo *self,
|
||||||
&configured_branches, error))
|
&configured_branches, error))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
/* TODO reindent later */
|
/* Handle file:// URIs */
|
||||||
{ OstreeFetcherURI *first_uri = pull_data->meta_mirrorlist->pdata[0];
|
{
|
||||||
|
OstreeFetcherURI *first_uri = pull_data->meta_mirrorlist->pdata[0];
|
||||||
g_autofree char *first_scheme = _ostree_fetcher_uri_get_scheme (first_uri);
|
g_autofree char *first_scheme = _ostree_fetcher_uri_get_scheme (first_uri);
|
||||||
|
|
||||||
/* NB: we don't support local mirrors in mirrorlists, so if this passes, it
|
/* NB: we don't support local mirrors in mirrorlists, so if this passes, it
|
||||||
* means that we're not using mirrorlists (see also fetch_mirrorlist())
|
* means that we're not using mirrorlists (see also fetch_mirrorlist())
|
||||||
* Also, we explicitly disable the "local repo" path if static deltas
|
* Also, we explicitly disable the "local repo" path if static deltas
|
||||||
* were explicitly requested to be required; this is going to happen
|
* were explicitly requested to be required; this is going to happen
|
||||||
* most often for testing deltas without setting up a HTTP server.
|
* most often for testing deltas without setting up a HTTP server.
|
||||||
*/
|
*/
|
||||||
if (g_str_equal (first_scheme, "file") && !pull_data->require_static_deltas)
|
if (g_str_equal (first_scheme, "file") && !pull_data->require_static_deltas)
|
||||||
{
|
{
|
||||||
g_autofree char *path = _ostree_fetcher_uri_get_path (first_uri);
|
g_autofree char *path = _ostree_fetcher_uri_get_path (first_uri);
|
||||||
g_autoptr(GFile) remote_repo_path = g_file_new_for_path (path);
|
g_autoptr(GFile) remote_repo_path = g_file_new_for_path (path);
|
||||||
pull_data->remote_repo_local = ostree_repo_new (remote_repo_path);
|
pull_data->remote_repo_local = ostree_repo_new (remote_repo_path);
|
||||||
if (!ostree_repo_open (pull_data->remote_repo_local, cancellable, error))
|
if (!ostree_repo_open (pull_data->remote_repo_local, cancellable, error))
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Change some option defaults if we're actually pulling from a local
|
/* Change some option defaults if we're actually pulling from a local
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue