Closed KortanZ closed 4 years ago
It shows just a single line error info fatal: not a git repository (or any of the parent directories): .git
when i press E
in each plugins line.
Does it happen only for one plugin, or for all of them? I just give it a try, and it doesn't happen for me. What do you get for :!git --version
?
I've got git version 2.21.0.windows.1
.
And it happen for all of them.
Does it error out, but it is installed, or it doesn't get installed at all?
All plugins are installed correctly, it just error out, and when run :PackgerUpdate
, it dose nothing except throw this error out.
I suspect that there might be something wrong about path-join stuff when do git pull.
I also record some log use -V14 flage when run PackagerUpdate
.
Hers is the line i thouth might help
Executing command: "'cmd.exe' '/c' '"git -C C:\Users\Kortan\AppData\Local\nvim\pack\packager\opt\nvim-lsp rev-parse --abbrev-ref HEAD"'"
calling function packager#update[2]..5[19]..29[2]..26[14]..33[11]..packager#utils#system[3]..packager#utils#restore_shell(['cmd.exe', '/s /c', '>%s 2>&1'])
function packager#update[2]..5[19]..29[2]..26[14]..33[11]..packager#utils#system[3]..packager#utils#restore_shell returning #0
continuing in function packager#update[2]..5[19]..29[2]..26[14]..33[11]..packager#utils#system
function packager#update[2]..5[19]..29[2]..26[14]..33[11]..packager#utils#system returning ['master']
continuing in function packager#update[2]..5[19]..29[2]..26[14]..33
function packager#update[2]..5[19]..29[2]..26[14]..33 returning 'master'
continuing in function packager#update[2]..5[19]..29[2]..26
function packager#update[2]..5[19]..29[2]..26 returning ['cd', 'C:\Users\Kortan\AppData\Local\... '--init', '--recursive', '--progress']
continuing in function packager#update[2]..5[19]..29
function packager#update[2]..5[19]..29 returning 'cd C:\Users\Kortan\AppData\Local\nvim...e update --init --recursive --progress'
continuing in function packager#update[2]..5
calling function packager#update[2]..5[19]..19('cd C:\Users\Kortan\AppData\Local\nvim...e update --init --recursive --progress', {'handler': 's:stdout_handler', 'plugi...me': 'nvim-lsp'}, 'limit_jobs': v:true})
calling function packager#update[2]..5[19]..19[21]..packager#utils#set_shell()
function packager#update[2]..5[19]..19[21]..packager#utils#set_shell returning ['cmd.exe', '/s /c', '>%s 2>&1']
continuing in function packager#update[2]..5[19]..19
calling function packager#update[2]..5[19]..19[22]..packager#job#start('cd C:\Users\Kortan\AppData\Local\nvim...e update --init --recursive --progress', {'on_exit': function('<SNR>23_stdout_h...nction('21'), 'clean': function('6')})})
calling function packager#update[2]..5[19]..19[22]..packager#job#start[1]..<SNR>26_job_start('cd C:\Users\Kortan\AppData\Local\nvim...e update --init --recursive --progress', {'on_exit': function('<SNR>23_stdout_h...nction('21'), 'clean': function('6')})})
calling function packager#update[2]..5[19]..19[22]..packager#job#start[1]..<SNR>26_job_start[1]..<SNR>26_job_supported_types()
function packager#update[2]..5[19]..19[22]..packager#job#start[1]..<SNR>26_job_start[1]..<SNR>26_job_supported_types returning ['nvimjob']
continuing in function packager#update[2]..5[19]..19[22]..packager#job#start[1]..<SNR>26_job_start
calling function packager#update[2]..5[19]..19[22]..packager#job#start[1]..<SNR>26_job_start[18]..<SNR>26_job_supports_type('nvimjob')
calling function packager#update[2]..5[19]..19[22]..packager#job#start[1]..<SNR>26_job_start[18]..<SNR>26_job_supports_type[1]..<SNR>26_job_supported_types()
function packager#update[2]..5[19]..19[22]..packager#job#start[1]..<SNR>26_job_start[18]..<SNR>26_job_supports_type[1]..<SNR>26_job_supported_types returning ['nvimjob']
continuing in function packager#update[2]..5[19]..19[22]..packager#job#start[1]..<SNR>26_job_start[18]..<SNR>26_job_supports_type
function packager#update[2]..5[19]..19[22]..packager#job#start[1]..<SNR>26_job_start[18]..<SNR>26_job_supports_type returning #1
continuing in function packager#update[2]..5[19]..19[22]..packager#job#start[1]..<SNR>26_job_start
function packager#update[2]..5[19]..19[22]..packager#job#start[1]..<SNR>26_job_start returning #14
continuing in function packager#update[2]..5[19]..19[22]..packager#job#start
function packager#update[2]..5[19]..19[22]..packager#job#start returning #14
continuing in function packager#update[2]..5[19]..19
calling function packager#update[2]..5[19]..19[23]..packager#utils#restore_shell(['cmd.exe', '/s /c', '>%s 2>&1'])
function packager#update[2]..5[19]..19[23]..packager#utils#restore_shell returning #0
continuing in function packager#update[2]..5[19]..19
function packager#update[2]..5[19]..19 returning #14
continuing in function packager#update[2]..5
function packager#update[2]..5 returning #0
continuing in function packager#update
function packager#update returning #0
I also tried every old version of this plugin since this commit and error still occurs.
Uh, that's really strange. It shouldn't be happening for older version, no one reported it. Can you give me your full vimrc and your gitconfig ?
The init.vim file (vimrc file in neovim) shown top of this issue is my full init.vim file. and here is my all gitconfig:
C:\Users\Kortan>git config --list --show-origin
file:"C:\\ProgramData/Git/config" core.symlinks=false
file:"C:\\ProgramData/Git/config" core.autocrlf=true
file:"C:\\ProgramData/Git/config" core.fscache=true
file:"C:\\ProgramData/Git/config" color.diff=auto
file:"C:\\ProgramData/Git/config" color.status=auto
file:"C:\\ProgramData/Git/config" color.branch=auto
file:"C:\\ProgramData/Git/config" color.interactive=true
file:"C:\\ProgramData/Git/config" help.format=html
file:"C:\\ProgramData/Git/config" rebase.autosquash=true
file:D:/Software/Git/mingw64/etc/gitconfig http.sslbackend=openssl
file:D:/Software/Git/mingw64/etc/gitconfig http.sslcainfo=D:/Software/Git/mingw64/ssl/certs/ca-bundle.crt
file:D:/Software/Git/mingw64/etc/gitconfig credential.helper=manager
file:C:/Users/Kortan/.gitconfig user.name=Kortan
file:C:/Users/Kortan/.gitconfig user.email=##my_email##
Can you temporarily remove all custom git config that you have and try to run install/update to see if it happens?
I don't have any custom git config except user name and user email which is required by git.
In this file C:\\ProgramData/Git/config
these core
and rebase
settings, not sure what they do. Maybe go there and comment it out temporarily?
I know exactly what they are doing, they have no effect to git pull operation. But i do comment them out and have a try. The error still.
Actually i think git works well and this error is nothing about git itself since in log message vim-packager get every plugins branch name successfully.
I tried it on same Windows 10 build, and with latest development prerelease, and didn't get any error. Cannot reproduce it unfortunately...
It looks like git error since from 2nd comment you said when you press E it says fatal not a git repository, which means some git command failed.
I would need help with this. Try applying this patch to the vim-packager, and give me all the results of :messages
after it finishes.
diff --git a/autoload/packager.vim b/autoload/packager.vim
index 8ed7f34..db1d529 100644
--- a/autoload/packager.vim
+++ b/autoload/packager.vim
@@ -60,9 +60,11 @@ function! s:packager.install(opts) abort
for l:plugin in values(self.processed_plugins)
call packager#utils#append(3, l:plugin.get_initial_status())
- call self.start_job(l:plugin.command(self.depth), {
+ let l:cmd = l:plugin.command(self.depth)
+ call self.start_job(l:cmd, {
\ 'handler': 's:stdout_handler',
\ 'plugin': l:plugin,
+ \ 'cmd': l:cmd,
\ 'limit_jobs': v:true
\ })
endfor
@@ -87,8 +89,10 @@ function! s:packager.update(opts) abort
for l:plugin in values(self.processed_plugins)
call packager#utils#append(3, l:plugin.get_initial_status())
- call self.start_job(l:plugin.command(self.depth), {
+ let l:cmd = l:plugin.command(self.depth)
+ call self.start_job(l:cmd, {
\ 'handler': 's:stdout_handler',
+ \ 'cmd': l:cmd,
\ 'plugin': l:plugin,
\ 'limit_jobs': v:true
\ })
@@ -410,9 +414,9 @@ function! s:packager.start_job(cmd, opts) abort
endif
let l:opts = {
- \ 'on_stdout': function(a:opts.handler, [a:opts.plugin], self),
- \ 'on_stderr': function(a:opts.handler, [a:opts.plugin], self),
- \ 'on_exit': function(a:opts.handler, [a:opts.plugin], self)
+ \ 'on_stdout': function(a:opts.handler, [a:opts.plugin, a:opts.cmd], self),
+ \ 'on_stderr': function(a:opts.handler, [a:opts.plugin, a:opts.cmd], self),
+ \ 'on_exit': function(a:opts.handler, [a:opts.plugin, a:opts.cmd], self)
\ }
if has_key(a:opts, 'cwd')
@@ -460,7 +464,9 @@ function! s:packager.add_mappings() abort
endif
endfunction
-function! s:stdout_handler(plugin, id, message, event) dict abort
+function! s:stdout_handler(plugin, cmd, id, message, event) dict abort
+ echom 'COMMAND '.string(a:cmd)
+ echom 'OUTPUT '.string(a:message)
call a:plugin.log_event_messages(a:event, a:message)
if a:event !=? 'exit'
@@ -499,6 +505,7 @@ function! s:stdout_handler(plugin, id, message, event) dict abort
else
call self.start_job(a:plugin.do, {
\ 'handler': 's:hook_stdout_handler',
+ \ 'cmd': [],
\ 'plugin': a:plugin,
\ 'cwd': a:plugin.dir
\ })
:messages
shows nothing, but when i do :PackagerUpdate
, it shows some cd
and git
like command log
Yeah, apply the patch, start neovim, run :PackagerUpdate
, and when it finishes (you will probably have to press enter few times while it prints out everything), run :messages
and send me all the messages that you get printed.
My fault, i don't say it clearly. What you say is exactyl what i have done above-- run PackagerUpdate
and press enter till it finished and run :messages
. and nvim shows nothing.
It seems that :messages
dose not record the log
Ah, sorry, my bad. I updated the patch. It needs to be echom
instead of echo
. Just re-apply the patch and give it another try.
Here is the log:
COMMAND 'cd C:\Users\Kortan\AppData\Local\nvim\pack\packager\opt\vim-easymotion && git pull --ff-only --progress --rebase=false && git submodule update --init --recursive --progress'
OUTPUT ['']
COMMAND 'cd C:\Users\Kortan\AppData\Local\nvim\pack\packager\opt\vim-easymotion && git pull --ff-only --progress --rebase=false && git submodule update --init --recursive --progress'
OUTPUT ['fatal: not a git repository (or any of the parent directories): .git', '']
COMMAND 'cd C:\Users\Kortan\AppData\Local\nvim\pack\packager\opt\vim-easymotion && git pull --ff-only --progress --rebase=false && git submodule update --init --recursive --progress'
OUTPUT ['']
COMMAND 'cd C:\Users\Kortan\AppData\Local\nvim\pack\packager\opt\vim-packager && git pull --ff-only --progress --rebase=false && git submodule update --init --recursive --progress'
OUTPUT ['']
COMMAND 'cd C:\Users\Kortan\AppData\Local\nvim\pack\packager\opt\vim-packager && git pull --ff-only --progress --rebase=false && git submodule update --init --recursive --progress'
OUTPUT ['fatal: not a git repository (or any of the parent directories): .git', '']
COMMAND 'cd C:\Users\Kortan\AppData\Local\nvim\pack\packager\opt\vim-packager && git pull --ff-only --progress --rebase=false && git submodule update --init --recursive --progress'
OUTPUT ['']
COMMAND 'cd C:\Users\Kortan\AppData\Local\nvim\pack\packager\opt\vim-easymotion && git pull --ff-only --progress --rebase=false && git submodule update --init --recursive --progress'
OUTPUT 128
COMMAND 'cd C:\Users\Kortan\AppData\Local\nvim\pack\packager\opt\vim-packager && git pull --ff-only --progress --rebase=false && git submodule update --init --recursive --progress'
OUTPUT 128
COMMAND 'cd C:\Users\Kortan\AppData\Local\nvim\pack\packager\opt\nvim-lsp && git pull --ff-only --progress --rebase=false && git submodule update --init --recursive --progress'
OUTPUT ['fatal: not a git repository (or any of the parent directories): .git', '']
COMMAND 'cd C:\Users\Kortan\AppData\Local\nvim\pack\packager\opt\nvim-lsp && git pull --ff-only --progress --rebase=false && git submodule update --init --recursive --progress'
OUTPUT ['']
COMMAND 'cd C:\Users\Kortan\AppData\Local\nvim\pack\packager\opt\nvim-lsp && git pull --ff-only --progress --rebase=false && git submodule update --init --recursive --progress'
OUTPUT ['']
COMMAND 'cd C:\Users\Kortan\AppData\Local\nvim\pack\packager\opt\nvim-lsp && git pull --ff-only --progress --rebase=false && git submodule update --init --recursive --progress'
OUTPUT 128
The weired things is that if i manually run the commands above in cmd, everything works fine and it returns Already up to date
when you go to vim-packager
folder, and run this git config --get remote.origin.url
, what do you get?
https://github.com/kristijanhusak/vim-packager.git
but only vim-packager get the .git at the end fo url, in other plugin folder, it get
https://github.com/easymotion/vim-easymotion
What if you try to run git commands from log, but inside vim, like this:
:!cd C:\Users\Kortan\AppData\Local\nvim\pack\packager\opt\vim-packager && git pull --ff-only --progress --rebase=false && git submodule update --init --recursive --progress
What do you get?
Error same as PackagerUpdate
Give me output of these commands in vim:
echo &shell
echo &shellcmdflag
echo &shellredir
cmd.exe
/s /c
>%s 2>&1
Ok. I forgot this one:
echo &shellslash
Also, lets try this. Go to the vim-packager folder, and open neovim from there (or cd to the vim-packager folder). Just make sure cwd in neovim is set to vim-packager folder. Then, run this:
:!git pull --ff-only --progress --rebase=false && git submodule update --init --recursive --progress
Do you still get the same?
echo &shellslash
returns 0
and when i cd in vim-packager folder, command returns Already up to date
What if you run command like this? (Note the /d
added)
:!cd /d C:\Users\Kortan\AppData\Local\nvim\pack\packager\opt\vim-packager && git pull --ff-only --progress --rebase=false && git submodule update --init --recursive --progress
THAT WORKS, I got Already up to date
Ok great. I'll push a fix soon.
Really thank you for your help!
I pushed a fix. Pull latest vim-packager and give it a try.
I've tested PackgerInstall
and PackagerUpadte
, it works really well.
Ok great, closing. Thanks for reporting.
information
OS: Windows 10 1903 build 18362.535 Vim Version: Neovim v0.5.0-240-gbc879dd1f
init.vim
Detail info
When running
:PackagerInstal
in nvim, git clone info shows properly at first, and when clone finished (I do found plugins at~\AppData\Local\nvim\pack\packager\opt
) it shows thatError (exit status 128) - fatal: not a git repository (or any of the parent directories): .git
It shows the same error when i run:PackagerUpdate
command.