airblade / vim-gitgutter

A Vim plugin which shows git diff markers in the sign column and stages/previews/undoes hunks and partial hunks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

g:gitgutter_diff_base () is invalid

ta3pks opened this issue · comments

What is the latest commit SHA in your installed vim-gitgutter?
6efb835
What vim/nvim version are you on?
0.9.4

Everything was fine after doing an update to gitgutter started receiving this error message on startup

Yeah I just tested it too, and indeed, the last commit (6efb835) breaks it. It's supposed to fix another issue from 2h ago: #873, but apparently it broke others.

Please could you apply this patch?

diff --git i/autoload/gitgutter/utility.vim w/autoload/gitgutter/utility.vim
index 9c196fc..ba50d3c 100644
--- i/autoload/gitgutter/utility.vim
+++ w/autoload/gitgutter/utility.vim
@@ -291,7 +291,7 @@ function! s:obtain_file_renames(bufnr, base)
   let [out, error_code] = gitgutter#utility#system(gitgutter#utility#cd_cmd(a:bufnr, cmd))
   if error_code
     " Assume the problem is the diff base.
-    call gitgutter#utility#warn('g:gitgutter_diff_base ('.a:base.') is invalid')
+    echom error_code ' :: ' out
     return {}
   endif
   for line in split(out, '\n')

And let me know what message it prints?

Never mind, I've seen the problem. The -c flag applies to git, not the diff subcommand.

thanks for the swift action :)