From: Tobias Ulmer Date: Fri, 19 Feb 2016 14:18:11 +0000 (+0100) Subject: git: fetch tags and pull ff-only X-Git-Tag: e2factory-2.3.15rc1~538 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=abc359f2b2aa56d18127cd85df47efddac44f4c8;p=e2factory.git git: fetch tags and pull ff-only Signed-off-by: Tobias Ulmer --- 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