Remove builder_git_checkout_dir

It is completely unused now that we checkout the whole tree in the
from-git code path.

Closes: #260
Approved by: alexlarsson
auto
Mathieu Bridon 2019-01-18 15:43:37 +01:00 committed by Atomic Bot
parent 7d318128b6
commit 416b7f599b
2 changed files with 0 additions and 44 deletions

View File

@ -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,

View File

@ -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,