kristijanhusak / vim-packager

Vim plugin manager that utilizes "jobs" and "pack" features.
MIT License
245 stars 9 forks source link

status doesn't show any commits for updated plugins #11

Closed ahmedelgabri closed 4 years ago

ahmedelgabri commented 4 years ago

Since vim-packager seems to share lots of things with minpac I assume it's having the same issue also https://github.com/k-takata/minpac/issues/76

kristijanhusak commented 4 years ago

Did you give it a try?

Works fine for me:

screenshot

ahmedelgabri commented 4 years ago

I have already tried & that's why I opened the issue. Will post a screenshot when I have access to my laptop again.

ahmedelgabri commented 4 years ago

Both of these plugins got updated today & that's all I can see for example

Screenshot 2019-12-01 at 13 02 38

When I run the same command as in https://github.com/kristijanhusak/vim-packager/blob/5707582df80b9d3fbdd5e0620664c73e6fc8f4c7/autoload/packager/plugin.vim#L129-L131 I don't get anything, while it's very clear that they have new updates if I cd into the directories & do a normal git log

Screenshot 2019-12-01 at 13 06 24
kristijanhusak commented 4 years ago

I need few things to try to figure this out:

First, give me your git version (git --version)

Second, i need you to do these steps:

  1. Go to vim-fugitive folder, do git reset --hard dc53206
  2. Open vim, do PackagerUpdate
  3. Restart vim
  4. do a PackagerStatus
  5. Give me screenshot of status buffer
ahmedelgabri commented 4 years ago

First, give me your git version (git --version)

git version 2.24.0

Second, i need you to do these steps:

  1. Go to vim-fugitive folder, do git reset --hard dc53206
  2. Open vim, do PackagerUpdate
  3. Restart vim
  4. do a PackagerStatus
  5. Give me screenshot of status buffer
Screenshot 2019-12-01 at 18 11 40
kristijanhusak commented 4 years ago

That's really strange. What you get if you do a git log like this in vim-fugitive folder?

git log HEAD@{1}..

Edit: Also try this (note the double quotes):

git log "HEAD@{1}.."
ahmedelgabri commented 4 years ago

Both return nothing…

ahmedelgabri commented 4 years ago

Changing it to git log HEAD@{2}.. works though, but nothing is returned with HEAD@{1}

kristijanhusak commented 4 years ago

What's the result of the HEAD@{2}.. ?

ahmedelgabri commented 4 years ago
Screenshot 2019-12-01 at 18 49 12
kristijanhusak commented 4 years ago

That should be the result of HEAD@{1}...

Can you give me your .gitconfig file?

And also do a screenshot of git reflog.

ahmedelgabri commented 4 years ago

Here is my .gitconfig

git reflog for vim-fugitive folder

671a85d (HEAD -> master, origin/master, origin/HEAD) HEAD@{0}: rebase finished: refs/heads/master onto 671a85dabaed7e21aa7e435adfdad9b9461cb7d8
671a85d (HEAD -> master, origin/master, origin/HEAD) HEAD@{1}: pull --ff-only --progress: checkout 671a85dabaed7e21aa7e435adfdad9b9461cb7d8
dc53206 HEAD@{2}: reset: moving to dc53206
671a85d (HEAD -> master, origin/master, origin/HEAD) HEAD@{3}: rebase finished: refs/heads/master onto 671a85dabaed7e21aa7e435adfdad9b9461cb7d8
671a85d (HEAD -> master, origin/master, origin/HEAD) HEAD@{4}: pull --ff-only --progress: checkout 671a85dabaed7e21aa7e435adfdad9b9461cb7d8
67efbf6 HEAD@{5}: clone: from https://github.com/tpope/vim-fugitive
kristijanhusak commented 4 years ago

Ok, i'm pretty sure it has to do something with this part of gitconfig:

[pull]
  rebase = true

Try to apply this patch to vim-packager:

diff --git a/autoload/packager/plugin.vim b/autoload/packager/plugin.vim
index 844fd06..fcc290a 100644
--- a/autoload/packager/plugin.vim
+++ b/autoload/packager/plugin.vim
@@ -65,7 +65,7 @@ function! s:plugin.update_git_command() abort
   endif

   if l:is_on_branch
-    let l:update_cmd += ['&&', 'git', 'pull', '--ff-only', '--progress']
+    let l:update_cmd += ['&&', 'git', 'pull', '--ff-only', '--progress', '--rebase=false']
   else
     let l:update_cmd += ['&&', 'git', 'fetch', self.url]
   endif

And then do the same steps like in the previous comment

to see if it works.

ahmedelgabri commented 4 years ago

Yes, this patch seems to fix the issue.

kristijanhusak commented 4 years ago

Ok, thanks.

I pushed the fix, do an update, and from now on every update should appear for you.

ahmedelgabri commented 4 years ago

Perfect! thank you very much.