Warn user when unable to list renamed files

This commit is contained in:
Andy Stewart
2023-12-07 13:56:55 +00:00
parent fe0e8a2630
commit 4b49965897

View File

@@ -308,7 +308,12 @@ function! s:obtain_file_renames(bufnr, base)
return {} return {}
endif endif
for line in split(out, '\n') for line in split(out, '\n')
let [original, current] = split(line)[1:] let fields = split(line)
if len(fields) != 3
call gitgutter#utility#warn('gitgutter: unable to list renamed files: '.line)
return {}
endif
let [original, current] = fields[1:]
let renames[current] = original let renames[current] = original
endfor endfor
return renames return renames