diff options
-rw-r--r-- | lib/gall/repository.lua | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/gall/repository.lua b/lib/gall/repository.lua index 57031ba..fc49576 100644 --- a/lib/gall/repository.lua +++ b/lib/gall/repository.lua @@ -23,8 +23,6 @@ local repomethod = {} local pattern = { fullsha = string.rep("[0-9a-f]", 40), - shortsha = string.rep("[0-9a-f]", 7), - ref = "refs/.+" } for k, v in pairs(pattern) do @@ -253,13 +251,10 @@ function repomethod:normalise(sha) -- Purpose is to take a 'shaish' object and normalise it if sha:match(pattern.fullsha) then return sha - elseif sha:match(pattern.ref) then - local ref, err = self:get_ref(sha) - return ref, err else local fullsha if ll.git2 then - local refobj = ll.git2.lookup_sha_from_ref(self.git2.repo, sha) + local refobj = ll.git2.revparse_single(self.git2.repo, sha) if refobj then fullsha = refobj end |