diff options
Diffstat (limited to 'lib/gall/repository.lua')
-rw-r--r-- | lib/gall/repository.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/gall/repository.lua b/lib/gall/repository.lua index 5c157d8..32be33c 100644 --- a/lib/gall/repository.lua +++ b/lib/gall/repository.lua @@ -263,6 +263,15 @@ local function _new(path) retrepo.work = workpath retrepo.HEAD = symref + if ll.git2 then + local git2, msg = ll.git2.Repository(retrepo.path) + if not git2 then + return nil, msg + end + local odb = git2:odb() + retrepo.git2 = { repo = git2, odb = odb } + end + return setmetatable(retrepo, repomt) end |