From aaf1278f03e866f0b978d4b0f0cc7084db251129 Mon Sep 17 00:00:00 2001 From: Paul Walker <paul@blacksun.org.uk> Date: Mon, 16 Nov 2020 10:55:48 +0000 Subject: [PATCH] check_repo() can't use 'count' for a variable name. Even though it's not prefixed with v:, Vim still regards it as attempting to overwrite it's internal (read-only) variable count. This is probably only hit when trying to use Vimagit to commit items to a freshly init'ed repo, so most people wouldn't encounter it. --- autoload/magit/git.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/magit/git.vim b/autoload/magit/git.vim index f5f9892..c7ba09d 100644 --- a/autoload/magit/git.vim +++ b/autoload/magit/git.vim @@ -312,8 +312,8 @@ function! magit#git#check_repo() try let head_br=magit#git#get_branch_name("HEAD") catch 'shell_error' - let count = magit#git#count_object()['count'] - if ( count != 0 ) + let object_count = magit#git#count_object()['count'] + if ( object_count != 0 ) return 1 endif endtry -- GitLab