From abc359f2b2aa56d18127cd85df47efddac44f4c8 Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Fri, 19 Feb 2016 15:18:11 +0100 Subject: [PATCH] git: fetch tags and pull ff-only Signed-off-by: Tobias Ulmer --- Changelog | 1 + local/git.lua | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index a6b3e86..a804e5c 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ NEXT: + * on git source update, fetch tags and prevent non-ff merges e2factory-2.3.14p1 * Provide io.open/io.popen wrappers that set FD_CLOEXEC diff --git a/local/git.lua b/local/git.lua index 759dfef..9981a94 100644 --- a/local/git.lua +++ b/local/git.lua @@ -205,6 +205,10 @@ function git.update(info, sourcename) if not rc then return false, e:cat(re) end + rc, re = e2lib.git(nil, "fetch", "--tags") + if not rc then + return false, e:cat(re) + end e:append("fetch succeeded") -- setup the branch tracking its remote. This fails if the branch exists, @@ -227,7 +231,7 @@ function git.update(info, sourcename) if not rc then return false, e:append("working copy not available") end - rc, re = e2lib.git(nil, "pull") + rc, re = e2lib.git(nil, "pull", "--ff-only") if not rc then return false, e:cat(re) end -- 2.39.5