forked from Mirrors/flatpak-builder
Fix --disable-updates for git sources
We lost the ability to not update if a git repo was already checked out. This fixes that again. Closes: #98 Approved by: alexlarssontingping/wmclass
parent
c06ee375c3
commit
cd0c9da8f3
|
@ -516,9 +516,15 @@ builder_git_mirror_repo (const char *repo_location,
|
|||
cached_git_dir = g_object_ref (cache_mirror_dir);
|
||||
|
||||
/* If we're not updating, only pull from cache to avoid network i/o */
|
||||
if (!update && cached_git_dir)
|
||||
origin = g_file_get_uri (cached_git_dir);
|
||||
else
|
||||
if (!update)
|
||||
{
|
||||
if (cached_git_dir)
|
||||
origin = g_file_get_uri (cached_git_dir);
|
||||
else if (!created)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (origin == NULL)
|
||||
origin = g_strdup ("origin");
|
||||
|
||||
refs = git_ls_remote (mirror_dir, origin, error);
|
||||
|
|
Loading…
Reference in New Issue