]> git.e2factory.org Git - e2factory.git/commitdiff
All generic_git.git_rev_list1() users are gone, delete it
authorTobias Ulmer <tu@emlix.com>
Tue, 5 Nov 2013 19:32:17 +0000 (20:32 +0100)
committerTobias Ulmer <tu@emlix.com>
Wed, 16 Nov 2016 14:41:16 +0000 (15:41 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/generic_git.lua

index 034aa3d0f8b733b065e43eeb4a4aebb43aaecc77..09c32b15872475b39da627b021396f85fa74f85a 100644 (file)
@@ -353,32 +353,6 @@ function generic_git.git_checkout1(gitwc, branch)
     return true
 end
 
---- Git rev-list wrapper.
--- @param gitdir Path to the git repository directory (GIT_DIR).
--- @param ref Git reference, see git-rev-list(1).
--- @return True on success, false on error.
--- @return Error object on failure
--- @return Hexadecimal commit ID string or empty string if there was no match.
-function generic_git.git_rev_list1(gitdir, ref)
-    local e, rc, re, argv, id
-
-    e = err.new("git rev-list failed")
-
-    argv = git_new_argv2(gitdir, nil, "rev-list", "--max-count=1", ref, "--")
-
-    rc, re, id = generic_git.git(argv)
-    if not rc then
-        return false, e:cat(re)
-    end
-
-    id = trim(id)
-    if string.match(id, "^%x+$") or id == "" then
-        return true, nil, id
-    end
-
-    return false, err.new("can't parse git rev-list output")
-end
-
 --- Initialize a git repository.
 -- @param rurl URL string where the repository should be created.
 -- @param shared Should the repository be shared with other users or not.