tpope / vim-fugitive

fugitive.vim: A Git wrapper so awesome, it should be illegal
https://www.vim.org/scripts/script.php?script_id=2975
20.01k stars 1.01k forks source link

E716: Key not present in Dictionary: "context" when executing Git difftool -y in bare repo #2306

Closed rockyzhang24 closed 5 months ago

rockyzhang24 commented 5 months ago

I'm using git bare repo to manage my dotfiles. In vim, I set the git dir and git work tree by :let $GIT_DIR = '/Users/my-name/.dotfiles' and :let $GIT_WORK_TREE = '/Users/my-name'. Then the error occurs when I execute :Git difftool -y (please see the screenshot below). It works well in normal git repos.

image

I believe it is caused by this commit (https://github.com/tpope/vim-fugitive/commit/ed9e21fb9bdbda7989c1c9190ca830d36a5df4e2). I reset fugitive to the previous commit and everything works.

Thank you.

rockyzhang24 commented 5 months ago

@tpope Thank you for this quick fix.

rockyzhang24 commented 5 months ago

After updating, I got another error.

image