Open nnzv opened 2 years ago
I cannot reproduce this issue with your config file. Files are committed without problems.
I cannot reproduce this issue with your config file. Files are committed without problems.
In advance, thanks for the support. I've tried some things (e.g, debugging):
Nvim start
% nvim -V20 ~/.config/nvim/wiki/index.md
...
...
line 4: let value = get(getbufvar(buffer, ''), 'vimwiki_'.a:key, '/\/\')
line 5: if type(value) != 1 || value !=# '/\/\'
line 6: return value
function <SNR>17_setup_buffer_enter[3]..vimwiki#vars#get_bufferlocal returning #0
continuing in function <SNR>17_setup_buffer_enter
line 4: return
line 5: endif
line 6:
line 7: call s:set_global_options()
calling function <SNR>17_setup_buffer_enter[7]..<SNR>17_set_global_options()
line 1: let s:vimwiki_autowriteall_saved = &autowriteall
line 2: let &autowriteall = vimwiki#vars#get_global('autowriteall')
calling function <SNR>17_setup_buffer_enter[7]..<SNR>17_set_global_options[2]..vimwiki#vars#get_global('autowriteall')
line 1: return g:vimwiki_global_vars[a:key]
function <SNR>17_setup_buffer_enter[7]..<SNR>17_set_global_options[2]..vimwiki#vars#get_global returning #1
continuing in function <SNR>17_setup_buffer_enter[7]..<SNR>17_set_global_options
line 3:
line 4: if !empty(vimwiki#vars#get_global('menu'))
calling function <SNR>17_setup_buffer_enter[7]..<SNR>17_set_global_options[4]..vimwiki#vars#get_global('menu')
line 1: return g:vimwiki_global_vars[a:key]
function <SNR>17_setup_buffer_enter[7]..<SNR>17_set_global_options[4]..vimwiki#vars#get_global returning 'Vimwiki'
continuing in function <SNR>17_setup_buffer_enter[7]..<SNR>17_set_global_options
line 5: exe 'nmenu enable '.vimwiki#vars#get_global('menu').'.Table'
calling function <SNR>17_setup_buffer_enter[7]..<SNR>17_set_global_options[5]..vimwiki#vars#get_global('menu')
line 1: return g:vimwiki_global_vars[a:key]
function <SNR>17_setup_buffer_enter[7]..<SNR>17_set_global_options[5]..vimwiki#vars#get_global returning 'Vimwiki'
continuing in function <SNR>17_setup_buffer_enter[7]..<SNR>17_set_global_options
line 5: nmenu enable Vimwiki.Table
line 6: endif
function <SNR>17_setup_buffer_enter[7]..<SNR>17_set_global_options returning #0
continuing in function <SNR>17_setup_buffer_enter
function <SNR>17_setup_buffer_enter returning #0
continuing in BufEnter Autocommands for "*.md"
Executing BufEnter Autocommands for "*"
autocommand call <sid>pull_changes()
Executing: call <sid>pull_changes()
calling function <SNR>51_pull_changes()
line 1: if g:zettel_synced==0
line 2: echom "[vimwiki sync] pulling changes"
[vimwiki sync] pulling changes
line 3: let g:zettel_synced = 1
line 4: if has("nvim")
line 5: let gitjob = jobstart("git -C " . g:zettel_dir . " pull origin " . g:vimwiki_sync_branch, {"exit_cb": "My_exit_cb", "close_cb": "My_close_cb"})
line 6: if g:sync_taskwarrior==1
line 7: let taskjob = jobstart("task sync")
line 8: endif
line 9: else
line 10: let gitjob = job_start("git -C " . g:zettel_dir . " pull origin " . g:vimwiki_sync_branch, {"exit_cb": "My_exit_cb", "close_cb": "My_close_cb"})
line 11: if g:sync_taskwarrior==1
line 12: let taskjob = job_start("task sync")
line 13: endif
line 14: endif
line 15: endif
function <SNR>51_pull_changes returning #0
continuing in BufEnter Autocommands for "*"
Executing VimEnter Autocommands for "*"
Press ENTER or type command to continue
autocommand call <sid>pull_changes()
Press ENTER or type command to continue
Executing: call <sid>pull_changes()
calling function <SNR>51_pull_changes()
line 1: if g:zettel_synced==0
line 2: echom "[vimwiki sync] pulling changes"
line 3: let g:zettel_synced = 1
line 4: if has("nvim")
line 5: let gitjob = jobstart("git -C " . g:zettel_dir . " pull origin " . g:vimwiki_sync_branch, {"exit_cb": "My_exit_cb", "close_cb": "My_close_cb"})
line 6: if g:sync_taskwarrior==1
line 7: let taskjob = jobstart("task sync")
line 8: endif
line 9: else
line 10: let gitjob = job_start("git -C " . g:zettel_dir . " pull origin " . g:vimwiki_sync_branch, {"exit_cb": "My_exit_cb", "close_cb": "My_close_cb"})
line 11: if g:sync_taskwarrior==1
line 12: let taskjob = job_start("task sync")
line 13: endif
line 14: endif
line 15: endif
function <SNR>51_pull_changes returning #0
continuing in VimEnter Autocommands for "*"
Nvim Exit
:q
Executing: q
Executing VimLeave Autocommands for "*"
autocommand call <sid>git_action("git -C " . g:zettel_dir . " push origin " . g:vimwiki_sync_branch)
Executing: call <sid>git_action("git -C " . g:zettel_dir . " push origin " . g:vimwiki_sync_branch)
calling function <SNR>51_git_action('git -C /home/nzv/.config/nvim/wiki/ push origin HEAD')
line 1: execute ':silent !' . a:action
line 1: :silent !git -C /home/nzv/.config/nvim/wiki/ push origin HEAD
What is strange is that git add
and git commit
are executed in the same command, executed on every file write in Vimwiki:
au! BufWritePost * call <sid>git_action("git -C " . g:zettel_dir . " add . ; git -C " . g:zettel_dir . " commit -m \"" . strftime(g:vimwiki_sync_commit_message) . "\"")
So maybe git add
fails, and git commit
isn't executed?
What is strange is that git add and git commit are executed in the same command [...]
Shouldn't it do? As far as I'm concerned, that's implemented on vimwiki-sync.
So maybe git add fails, and git commit isn't executed?
Certainly not, modified files were added successful. BTW, Nowadays, I use gpg
to commit.
Shouldn't it do? As far as I'm concerned, that's implemented on vimwiki-sync.
I meant that it is strange that your files get added, but not committed, as these two commands should run consecutively.
Does your log contain info for the BufWritePost
autocommands?
Reproduce
:wq
Expected behavior
Commit the added file on
nvim
exit.Neovim Information
Additional Information