diff --git a/src/builder-git.c b/src/builder-git.c index 46c39fca..a77000bd 100644 --- a/src/builder-git.c +++ b/src/builder-git.c @@ -821,44 +821,6 @@ git_extract_submodule (const char *repo_location, return TRUE; } -gboolean -builder_git_checkout_dir (const char *repo_location, - const char *branch, - const char *dir, - GFile *dest, - BuilderContext *context, - GError **error) -{ - g_autoptr(GFile) mirror_dir = NULL; - g_autofree char *mirror_dir_path = NULL; - g_autofree char *dest_path = NULL; - g_autofree char *dest_path_git = NULL; - - mirror_dir = git_get_mirror_dir (repo_location, context); - - mirror_dir_path = g_file_get_path (mirror_dir); - dest_path = g_file_get_path (dest); - dest_path_git = g_build_filename (dest_path, ".git", NULL); - - g_mkdir_with_parents (dest_path, 0755); - - if (!cp (error, - "-al", - mirror_dir_path, dest_path_git, NULL)) - return FALSE; - - /* Then we need to convert to regular */ - if (!git (dest, NULL, 0, error, - "config", "--bool", "core.bare", "false", NULL)) - return FALSE; - - if (!git (dest, NULL, 0, error, - "checkout", branch, "--", dir ? dir : ".", NULL)) - return FALSE; - - return TRUE; -} - gboolean builder_git_checkout (const char *repo_location, const char *branch, diff --git a/src/builder-git.h b/src/builder-git.h index 94db6ca6..1ae43703 100644 --- a/src/builder-git.h +++ b/src/builder-git.h @@ -49,12 +49,6 @@ gboolean builder_git_checkout (const char *repo_location, GFile *dest, BuilderContext *context, GError **error); -gboolean builder_git_checkout_dir (const char *repo_location, - const char *branch, - const char *dir, - GFile *dest, - BuilderContext *context, - GError **error); gboolean builder_git_shallow_mirror_ref (const char *repo_location, const char *destination_path, const char *ref,