gregsexton / gitv

gitk for Vim.
938 stars 59 forks source link

Commits not loaded on :Gitv #137

Closed rkiyanchuk closed 5 years ago

rkiyanchuk commented 5 years ago

In some repositories the plugin doesn't load commits for some reason. Unfortunately I couldn't figure out a pattern in the repositories that prevent gitv from loading the commits so far. It only shows HEAD and the prompt to load more commits, but pressing it does not do anything.

(HEAD -> hugo, r:origin/hugo, r:origin/HEAD) Fix .travis.yml  6 weeks ago   Ruslan Kiyanchuk  [9e06494│    1 tree 2905ac4c394d2a825866c04cbaccc09ef185bb3e
                                                                                                           │    2 parent f8b7fbc4d65bc1b921236818c63ec475baf47b66
  -- Load More --

The plugin is loaded as follows:

Plug 'tpope/vim-fugitive'
Plug 'gregsexton/gitv', {'on': ['Gitv']}

Gitv debug output

Basic information

Version: 1.3.1.22
Thu Feb 28 10:01:22 2019

Settings

--- Options ---
  backup              colorcolumn=80      filetype=gitv       infercase           readonly            shiftwidth=4        sidescrolloff=3     syntax=gitv         undofile          nowrapscan
  breakindent         columns=238         foldmethod=expr     lines=61            scroll=29           showbreak=↪         signcolumn=yes      tabstop=4           updatetime=1000
  bufhidden=wipe      cursorcolumn        helplang=en       nomodifiable          scrollback=-1       showfulltag         smartcase           termguicolors       virtualedit=all
nobuflisted           cursorline          hidden            nomodified            scrolloff=3       noshowmode            softtabstop=4       textwidth=79        window=60
  buftype=nofile      expandtab           ignorecase          mouse=a             shiftround          showtabline=2     noswapfile            title             nowrap
  backupdir=~/.local/share/nvim/site/backups
  clipboard=unnamed,unnamedplus
  completeopt=longest,menuone
  directory=~/.local/share/nvim/site/swap
  foldexpr=Foldlevelforbranch()
  foldtext=BranchFoldText()
  formatoptions=tcqjr
  listchars=tab:→ ,space:·,extends:▶,precedes:◀,nbsp:␣
  matchpairs=(:),{:},[:],<:>
  mousemodel=popup_setpos
  path=.,/usr/include,,,**
  runtimepath=~/.config/nvim,~/.local/share/nvim/site/plugins/vim-plug/,~/.local/share/nvim/site/plugins/NeoSolarized/,~/.local/share/nvim/site/plugins/vim-airline/,~/.local/share/nvim/site/plugins/vim-airline-themes/,~/.local/share/nvim/
site/plugins/markdown2ctags/,~/.local/share/nvim/site/plugins/rst2ctags/,~/.local/share/nvim/site/plugins/denite.nvim/,~/.local/share/nvim/site/plugins/ultisnips/,~/.local/share/nvim/site/plugins/vim-snippets/,~/.local/share/nvim/site/plu
gins/gitv/,~/.local/share/nvim/site/plugins/vim-fugitive/,~/.local/share/nvim/site/plugins/vim-signify/,~/.local/share/nvim/site/plugins/auto-pairs/,~/.local/share/nvim/site/plugins/deoplete.nvim/,~/.local/share/nvim/site/plugins/Language
Client-neovim/,~/.local/share/nvim/site/plugins/echodoc.vim/,~/.local/share/nvim/site/plugins/vim-polyglot/,~/.local/share/nvim/site/plugins/conky-syntax.vim/,~/.local/share/nvim/site/plugins/vim-vagrant/,~/.local/share/nvim/site/plugins/
hexmode/,~/.local/share/nvim/site/plugins/ansible-vim/,/etc/xdg/nvim,~/.local/share/n
  spelllang=en_us,ru_yo,uk
  statusline=%!airline#statusline(1)
  tabline=%!airline#extensions#tabline#get()
  undodir=~/.local/share/nvim/site/undo

Vim version

NVIM v0.3.4
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-
fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/tmp/neovim-20190113-54117-y16422/neovim-0.3.4/build/config -I/tmp/n
eovim-20190113-54117-y16422/neovim-0.3.4/src -I/usr/local/include -I/usr/local/opt/gettext/include -I/usr/include -I/tmp/neovim-20190113-54117-y16422/neovim-0.3.4/build/src/nvim/auto -I/tmp/neovim-20190113-54117-y16422/neovim-0.3.4/build/
include
Compiled by brew@HighSierra-2.local

Features: +acl +iconv +jemalloc +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.3.4/share/nvim"

Run :checkhealth for more info

Git output

$ git --version
git version 2.21.0
$ git status
On branch hugo
Your branch is up to date with 'origin/hugo'.

nothing to commit, working tree clean
$ git remote --verbose
origin  https://github.com/zoresvit/zoresvit.github.io.git (fetch)
origin  https://github.com/zoresvit/zoresvit.github.io.git (push)

Fugitive version

I noticed there is no Fugitive version in the above debug output, while it shows up as loaded if I do :scriptnames:

 1: ~/dotfiles/neovim/.config/nvim/init.vim
...
  5: ~/.local/share/nvim/site/plugins/vim-fugitive/ftdetect/fugitive.vim
...
 33: ~/.local/share/nvim/site/plugins/vim-fugitive/plugin/fugitive.vim 

I understand this is limited information, please let me know if I can provide any other debug information :)

Thanks!

rbong commented 5 years ago

I have tried the same version of neovim, with the same version of git, and the latest version of fugitive on the same repo on the same branch with no luck reproducing this. I did have lots of problems with neovim, but I have no way of knowing if that's the problem.

I also had problems getting fugitive debug information.

Make sure your version of Fugitive is up-to-date, although I would not expect that to cause any issues, and let me know if you have the same problems by using Vim instead of neovim (and let me know what version of Vim you're using if you do).

I have no way of testing OSX, so that could also be it.

aschrab commented 5 years ago

I'm not able to reproduce this problem on OS X using neovim.

Gitv debug output

Basic information

Version: 1.3.1.22
Wed  6 Mar 12:19:31 2019

Settings

--- Options ---
  backspace=2       nofixendofline        inccommand=split    nrformats=hex       showbreak=↪         undofile
  bufhidden=wipe      foldlevel=99        include=            pastetoggle=<F4>    showmatch           updatetime=200
nobuflisted           foldmethod=expr     infercase           path=.,,            sidescrolloff=10    visualbell
  buftype=nofile      foldminlines=2    nojoinspaces          readonly            smartcase           wildignorecase
  columns=133         guicursor=          lines=92            scroll=44         noswapfile            window=91
  cursorline          helplang=en         list                scrollback=-1       syntax=gitv       nowrap
  define=             hidden            nomodifiable          scrolloff=1         tabstop=4
  expandtab           history=1000      nomodified            secure              title
  filetype=gitv       ignorecase          mouse=a             shiftwidth=2        undodir=~/.undo,.
  cinkeys=0{,0}:,!^F,o,O,e
  cinoptions=l1,(0,t0
  clipboard=unnamedplus
  completeopt=longest,menuone
  cpoptions=aABceFs_$
  diffexpr=EnhancedDiff#Diff("git diff","--diff-algorithm=patience")
  diffopt=internal,filler,vertical,algorithm:patience,indent-heuristic
  fileencoding=utf-8
  fileencodings=ucs-bom,utf-8,euc-jp,latin1
  fileformats=unix,dos,mac
  foldexpr=Foldlevelforbranch()
  foldopen=mark,quickfix,tag,block,hor,search,insert,undo
  foldtext=BranchFoldText()
  formatoptions=tcqjr2
  formatlistpat=^\s*\d\+[\]:.)}]\s\+
  guifont=Monoisome Semi-Condensed 9,Source Code Pro for Powerline 9,Inconsolata Medium 14
  iconstring=Vim@%{$host} : %f (%{clean#TTY()})
  isfname=@,48-57,/,.,-,_,+,,,#,$,%,~
  listchars=tab:→·,trail:∙,nbsp:_,precedes:«,extends:»
  matchpairs=(:),{:},[:],<:>
  runtimepath=~/.config/nvim,~/.config/nvim/bundle/CamelCaseMotion,~/.config/nvim/bundle/SyntaxAttr,~/.config/nvim/bundle/abolish,~/.
config/nvim/bundle/ack,~/.config/nvim/bundle/airline,~/.config/nvim/bundle/airline-themes,~/.config/nvim/bundle/ale,~/.config/nvim/bu
ndle/apathy,~/.config/nvim/bundle/autoread,~/.config/nvim/bundle/bufexplorer,~/.config/nvim/bundle/characterize,~/.config/nvim/bundle
/cmdalias,~/.config/nvim/bundle/count_jump,~/.config/nvim/bundle/css-color,~/.config/nvim/bundle/dbext,~/.config/nvim/bundle/delimitM
ate,~/.config/nvim/bundle/deoplete,~/.config/nvim/bundle/diff-enhanced,~/.config/nvim/bundle/direnv,~/.config/nvim/bundle/dispatch,~/
.config/nvim/bundle/dispatch-neovim,~/.config/nvim/bundle/easy-align,~/.config/nvim/bundle/endwise,~/.config/nvim/bundle/eunuch,~/.co
nfig/nvim/bundle/exchange,~/.config/nvim/bundle/fugitive,~/.config/nvim/bundle/genutils,~/.config/nvim/bundle/git,~/.config/nvim/bund
le/git-gutter,~/.config/nvim/bundle/gitv,~/.config/nvim/bundle/gundo,~/.config/nvim/bundle/highlighted-yan
  shada=!,s1,%,'20,f1,c,h,r/tmp,r/media,n~/.nviminfo
  statusline=%!airline#statusline(1)
  tags=tags,TAGS,./tags;,./TAGS;
  titlestring=Vim@ : %{clean#CWD()}
  viewoptions=folds,cursor,curdir
  viminfo=!,s1,%,'20,f1,c,h,r/tmp,r/media,n~/.nviminfo
  wildignore=*.o,*~,*.pyc
  wildmode=longest:full,full
  wildoptions=tagfile

Vim version

NVIM v0.3.4
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBUG -
DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-pr
otector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VA
R_FROM -I/tmp/neovim-20190113-94620-d8vv4n/neovim-0.3.4/build/config -I/tmp/neovim-20190113-94620-d8vv4n/neovim-0.3.4/src -I/usr/loca
l/include -I/usr/local/opt/gettext/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacO
SX10.14.sdk/usr/include -I/tmp/neovim-20190113-94620-d8vv4n/neovim-0.3.4/build/src/nvim/auto -I/tmp/neovim-20190113-94620-d8vv4n/neov
im-0.3.4/build/include
Compiled by brew@Mojave.local

Features: +acl +iconv +jemalloc +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.3.4/share/nvim"

Run :checkhealth for more info

Git output

$ git --version
git version 2.21.0
$ git status
On branch hugo
Your branch is up to date with 'origin/hugo'.

nothing to commit, working tree clean
$ git remote --verbose
origin  https://github.com/zoresvit/zoresvit.github.io.git (fetch)
origin  ssh://git@github.com/zoresvit/zoresvit.github.io.git (push)

Fugitive version

rkiyanchuk commented 5 years ago

Thank you for the tips, I have now found the problem.

In my vim config I have the following autogroup:

    au Syntax * normal zR

For some reason it caused the above behavior. If I press zR or remove the mapping altogether, commits appear as expected, even though the mapping is supposed to open all folds, not close them, so I'm not sure why this happens.

But I guess the problem is solved :)