summaryrefslogtreecommitdiff
path: root/lib/gall/ll.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gall/ll.lua')
-rw-r--r--lib/gall/ll.lua14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/gall/ll.lua b/lib/gall/ll.lua
index 92200a4..3a24250 100644
--- a/lib/gall/ll.lua
+++ b/lib/gall/ll.lua
@@ -9,6 +9,17 @@
local sp = require "luxio.subprocess"
local util = require "gall.util"
+
+local git2
+if os.getenv "GALL_DISABLE_GIT2" then
+ git2 = nil
+else
+ ok, git2 = pcall(require, "gall.ll.git2")
+ if not ok then
+ git2 = nil
+ end
+end
+
local assert = assert
local git_exe = "git"
@@ -80,7 +91,8 @@ end
local mod_ret = {
rungit = _rungit,
get_set_git = get_set_git,
- chomp = _chomp
+ chomp = _chomp,
+ git2 = git2,
}
local simple_cmds = {