-- -*- Lua -*- -- Our purpose is to blacklist the git2 module(s) found on the package -- search path. We do that by loading an environment variable and then -- wrappering the third searcher as necessary. function __gall_ll_git2_blacklister(f, ignoreme) local type = type local function replacement(modname) local fret, fname = f(modname) if type(fret) == "function" and fname == ignoreme then return nil, "Blacklisted " .. fname .. "\n" end return fret, fname end return replacement end for fname in (os.getenv("__GALL_LL_GIT2_BLACKLIST") or ""):gmatch("([^:]+)") do package.searchers[3] = __gall_ll_git2_blacklister(package.searchers[3], fname) end