[ostree: 57/70] pull: More consistently use remote_repo_local for local repos



commit 594162f16a32e944d3bb2fdfea39aced6e6f620b
Author: Colin Walters <walters verbum org>
Date:   Tue Apr 5 15:37:32 2016 -0400

    pull: More consistently use remote_repo_local for local repos
    
    I think it's cleaner if we use `remote_repo_local` to know
    that we have a local repo.  In reality, it might be nicest
    if we didn't even create an `OstreeFetcher` for this case,
    but untangling the code is tricky.
    
    Closes: #239
    Approved by: alexlarsson

 src/libostree/ostree-repo-pull.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c
index e86ede5..f292951 100644
--- a/src/libostree/ostree-repo-pull.c
+++ b/src/libostree/ostree-repo-pull.c
@@ -1990,10 +1990,10 @@ ostree_repo_pull_with_options (OstreeRepo             *self,
   else
     {
       pull_data->remote_name = g_strdup (remote_name_or_baseurl);
-      if (!ostree_repo_remote_get_gpg_verify (self, remote_name_or_baseurl,
+      if (!ostree_repo_remote_get_gpg_verify (self, pull_data->remote_name,
                                               &pull_data->gpg_verify, error))
         goto out;
-      if (!ostree_repo_remote_get_gpg_verify_summary (self, remote_name_or_baseurl,
+      if (!ostree_repo_remote_get_gpg_verify_summary (self, pull_data->remote_name,
                                                       &pull_data->gpg_verify_summary, error))
         goto out;
     }
@@ -2123,7 +2123,7 @@ ostree_repo_pull_with_options (OstreeRepo             *self,
       }
 
     if (bytes_sig &&
-        !_ostree_repo_remote_name_is_file (remote_name_or_baseurl) &&
+        !pull_data->remote_repo_local &&
         !_ostree_repo_load_cache_summary_if_same_sig (self,
                                                       remote_name_or_baseurl,
                                                       bytes_sig,
@@ -2177,7 +2177,7 @@ ostree_repo_pull_with_options (OstreeRepo             *self,
 
     if (!summary_from_cache && bytes_summary && bytes_sig)
       {
-        if (!_ostree_repo_remote_name_is_file (remote_name_or_baseurl) &&
+        if (!pull_data->remote_repo_local &&
             !_ostree_repo_cache_summary (self,
                                          remote_name_or_baseurl,
                                          bytes_summary,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]