[ostree] ostree-repo-refs: Drop unused function "parse_rev_file".



commit bfd92653c32298fbf57e8e27ff5df09bb353f7a6
Author: Giuseppe Scrivano <gscrivan redhat com>
Date:   Thu Mar 5 12:18:30 2015 +0100

    ostree-repo-refs: Drop unused function "parse_rev_file".
    
    If it will be needed in future, it can be retrieved from the git
    history.
    
    Signed-off-by: Giuseppe Scrivano <gscrivan redhat com>

 src/libostree/ostree-repo-refs.c |   67 --------------------------------------
 1 files changed, 0 insertions(+), 67 deletions(-)
---
diff --git a/src/libostree/ostree-repo-refs.c b/src/libostree/ostree-repo-refs.c
index 5588c83..1122aec 100644
--- a/src/libostree/ostree-repo-refs.c
+++ b/src/libostree/ostree-repo-refs.c
@@ -122,73 +122,6 @@ write_checksum_file (GFile *parentdir,
   return ret;
 }
 
-
-static gboolean
-parse_rev_file (OstreeRepo     *self,
-                GFile          *f,
-                char          **sha256,
-                GError        **error) G_GNUC_UNUSED;
-
-static gboolean
-parse_rev_file (OstreeRepo     *self,
-                GFile          *f,
-                char          **sha256,
-                GError        **error)
-{
-  gboolean ret = FALSE;
-  GError *temp_error = NULL;
-  gs_free char *rev = NULL;
-
-  if ((rev = gs_file_load_contents_utf8 (f, NULL, &temp_error)) == NULL)
-    goto out;
-
-  if (rev == NULL)
-    {
-      if (g_error_matches (temp_error, G_FILE_ERROR, G_FILE_ERROR_NOENT))
-        {
-          g_clear_error (&temp_error);
-        }
-      else
-        {
-          g_propagate_error (error, temp_error);
-          goto out;
-        }
-    }
-  else
-    {
-      g_strchomp (rev);
-    }
-
-  if (g_str_has_prefix (rev, "ref: "))
-    {
-      gs_unref_object GFile *ref = NULL;
-      char *ref_sha256;
-      gboolean subret;
-
-      ref = g_file_resolve_relative_path (self->local_heads_dir, rev + 5);
-      subret = parse_rev_file (self, ref, &ref_sha256, error);
-        
-      if (!subret)
-        {
-          g_free (ref_sha256);
-          goto out;
-        }
-      
-      g_free (rev);
-      rev = ref_sha256;
-    }
-  else 
-    {
-      if (!ostree_validate_checksum_string (rev, error))
-        goto out;
-    }
-
-  ot_transfer_out_value(sha256, &rev);
-  ret = TRUE;
- out:
-  return ret;
-}
-
 static gboolean
 find_ref_in_remotes (OstreeRepo         *self,
                      const char         *rev,


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