summaryrefslogtreecommitdiff
path: root/lua/rclone.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/rclone.lua')
-rw-r--r--lua/rclone.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/lua/rclone.lua b/lua/rclone.lua
index fe0b85a..ae37188 100644
--- a/lua/rclone.lua
+++ b/lua/rclone.lua
@@ -181,6 +181,13 @@ local function build_cmd_exclude(local_path)
cmd = cmd .. ' --exclude-from=' .. gitignore.filename
end
+ local handle = io.popen('git config --get core.excludesfile', 'r')
+ local gitignore_global = Path:new((Path:new(handle:read())):expand())
+ handle:close()
+ if gitignore_global:exists() then
+ cmd = cmd .. ' --exclude-from=' .. gitignore_global.filename
+ end
+
-- add .rcloneignore patterns
local rcloneignore = Path:new(local_path .. '/.rcloneignore')
if rcloneignore:exists() then