From ea6747fcb4e07004258d91c6e9a5a161b74a5564 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 7 Mar 2017 14:20:44 +0100 Subject: [PATCH] builder: Fix --from-git We need to specify the full branch when checking out --- builder/builder-main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/builder/builder-main.c b/builder/builder-main.c index c0d36cba..a512b04c 100644 --- a/builder/builder-main.c +++ b/builder/builder-main.c @@ -339,12 +339,13 @@ main (int argc, if (opt_from_git) { g_autofree char *manifest_dirname = g_path_get_dirname (manifest_rel_path); + const char *git_branch = opt_from_git_branch ? opt_from_git_branch : "master"; + g_autofree char *git_origin_branch = g_strconcat ("origin/", git_branch, NULL); g_autoptr(GFile) build_subdir = NULL; if (!builder_git_mirror_repo (opt_from_git, !opt_disable_updates, FALSE, - opt_from_git_branch ? opt_from_git_branch : "master", - build_context, &error)) + git_branch, build_context, &error)) { g_printerr ("Can't clone manifest repo: %s\n", error->message); return 1; @@ -360,7 +361,7 @@ main (int argc, cleanup_manifest_dir = g_object_ref (build_subdir); if (!builder_git_checkout_dir (opt_from_git, - opt_from_git_branch ? opt_from_git_branch : "master", + git_origin_branch, manifest_dirname, build_subdir, build_context,