sodapopcan / vim-twiggy

Git branch management for Vim
280 stars 15 forks source link

Git Log (gL) not for the current twiggy window/repo #35

Open shergillg opened 4 years ago

shergillg commented 4 years ago

Hello,

I am hitting a issue when trying to use the gL command in a twiggy window. Here is what I am seeing:

  1. I start by opening a file from Git repo A. Then I open the Twiggy window. I do see the correct info about Git repo A.

  2. Next I go on to open another file from a different Git repo B. Then I open Twiggy window. Again, I do see the correct info about Git repo B. So far so good.

  3. However, when I do "gL" in the Twiggy window for Git repo B, for some reason it shows the logs for Git repo A.

Fugitive seems to show the correct Git repo info in the status bar as I go back and forth between the two open files. I also see the correct logs for the current file if I just run "GcLog". The issue when I try to use the Twiggy "gL" to get the logs for.

Any idea whats going on here ?

sodapopcan commented 4 years ago

Hello, sorry for the extreme delay in response.

As mentioned here, I really regret the log feature and was planning on removing it (though I haven't worked on twiggy in a good year so for now it's staying).

This actually exposed a general bug with twiggy, though, in that I cache the dir directory for twiggy based on the current tab. When invoking twiggy from a file in a different repo, it's using the git repo for that file, but if twiggy has already been opened in a different repo in the same tab, it will always get that one.

I never work in two repos in the same tab so I have never noticed.

I will fix this. Thanks for the report.

shergillg commented 3 years ago

No worries at all. Yeah, I really wasn't sure how common it is to be using multiple repo and have files open at the same time from them but thought I'll repot it anyway.

Thanks for looking into it.