From dfc11d5e87440b3b658d8014a154bfccfb0100d7 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Wed, 9 Dec 2015 14:07:33 +0100 Subject: [PATCH] builder: Support specifying commit ids as git branches --- builder/builder-source-git.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/builder/builder-source-git.c b/builder/builder-source-git.c index 1934aaee..37cc2172 100644 --- a/builder/builder-source-git.c +++ b/builder/builder-source-git.c @@ -476,7 +476,11 @@ builder_source_git_extract (BuilderSource *source, dest_path = g_file_get_path (dest); if (!git (NULL, NULL, error, - "clone", "--branch", get_branch (self), mirror_dir_path, dest_path, NULL)) + "clone", mirror_dir_path, dest_path, NULL)) + return FALSE; + + if (!git (dest, NULL, error, + "checkout", get_branch (self), NULL)) return FALSE; if (!git_extract_submodule (url, dest, context, error))