]> git.e2factory.org Git - e2factory.git/commitdiff
adjust to generic_git.list_refs changes
authorTobias Ulmer <tu@emlix.com>
Wed, 6 Mar 2019 18:15:37 +0000 (19:15 +0100)
committerTobias Ulmer <tu@emlix.com>
Wed, 13 Mar 2019 16:29:43 +0000 (17:29 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
global/e2-fetch-project.lua
plugins/gitrepo.lua

index b2065425aab758df073d818bf3be457e5c2becd7..4b2a3864d97a12d812ed3e963f49e6123be8173a 100644 (file)
@@ -157,7 +157,7 @@ local function e2_fetch_project(arg)
         -- Because the repository is freshly cloned, we can assume that when a
         -- ref for the requested branch exists, HEAD is at that branch.
         rc, re, id = generic_git.lookup_id(e2lib.join(p.destdir, ".git"),
-            false, generic_git.refs_heads(p.branch))
+            generic_git.NO_REMOTE, generic_git.refs_heads(p.branch))
         if not rc then
             error(e:cat(re))
         end
index 2e17755133f0df4c50e80dca97599d27f6f38d5e..d9f2c0ff9d653221b7fdee5d662faf73c1f9da6e 100644 (file)
@@ -277,7 +277,7 @@ function gitrepo_source:check_workingcopy()
         return true, nil
     end
 
-    rc, re, id = generic_git.lookup_id(gitdir, false, ref)
+    rc, re, id = generic_git.lookup_id(gitdir, generic_git.NO_REMOTE, ref)
     if not rc then
         return false, e:cat(re)
     elseif not id then
@@ -347,19 +347,19 @@ function gitrepo_source:fetch_source()
         return false, e:cat(re)
     end
 
-    rc, re, id = generic_git.lookup_id(git_dir, false,
-        "refs/heads/" .. self:get_branch())
+    rc, re, id = generic_git.lookup_id(git_dir, generic_git.NO_REMOTE,
+        generic_git.refs_heads(self:get_branch()))
     if not rc then
         return false, e:cat(re)
     elseif not id then
         rc, re = generic_git.git_branch_new1(work_tree, true, self:get_branch(),
-            "origin/" .. self:get_branch())
+            generic_git.refs_remote_heads(self:get_branch()))
         if not rc then
             return false, e:cat(re)
         end
 
         rc, re = generic_git.git_checkout1(work_tree,
-            "refs/heads/" .. self:get_branch())
+            generic_git.refs_heads(self:get_branch()))
         if not rc then
             return false, e:cat(re)
         end
@@ -404,7 +404,7 @@ function gitrepo_source:update_source()
     end
 
     -- Use HEAD commit ID to find the branch we're on
-    rc, re, id = generic_git.lookup_id(gitdir, false, "HEAD")
+    rc, re, id = generic_git.lookup_id(gitdir, generic_git.NO_REMOTE, "HEAD")
     if not rc then
         return false, e:cat(re)
     elseif not id then