fix: git mv errors when moving empty directory (#358)
This commit is contained in:
parent
2edb43a7ec
commit
6a7a10b611
1 changed files with 4 additions and 1 deletions
|
|
@ -96,7 +96,10 @@ M.mv = function(entry_type, src_path, dest_path, cb)
|
|||
on_exit = function(_, code)
|
||||
if code ~= 0 then
|
||||
stderr = vim.trim(stderr)
|
||||
if stderr:match("^fatal: not under version control") then
|
||||
if
|
||||
stderr:match("^fatal: not under version control")
|
||||
or stderr:match("^fatal: source directory is empty")
|
||||
then
|
||||
fs.recursive_move(entry_type, src_path, dest_path, cb)
|
||||
else
|
||||
cb("Error in git mv: " .. stderr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue