Open AndrewCSQ opened 5 years ago
Oh my! What version of git are you using?
2.21 it's strange because I recall it worked for just the briefest moment (and in that brief moment was some pretty awesome stuff) and then it went back to not working. I'm kind of new to (neo)vim (but not to programming as a whole), so I'm sorry that I'm taking up your time with a debugging request
Oh, not at all! 'tis the nature of open source :) I'm actually working on twiggy today so it's especially no problem.
There have been some plumbing changes recently that have caused a few issues for some folks. Unfortunately, I dev on a mac so I can't reproduce your set up exactly but I'll see what I can do.
Would you mind cloning twiggy, checkout 20cdca4
of this copy then point Plug to it and restart nvim? This was the last commit before I started to make some deeper changes. It doesn't really seem like it should cause this type of error, but it would be nice to rule it out.
Also, do you have Vim 8 on your machine? Is it the same problem if you do?
Also, thank you for your kind words! So sorry it's not working for you.
Under neovim, the issue persists even with the given commit. Either "Not a git repository" or the same EOF errors as above.
Under vim (both master and the commit mentioned) I get:
Error detected while processing twiggy#Branch[14]..
I suspect they stem from the same issue.
Interesting! Thank you so much for taking the time to do that.
Do you mind letting me know what the output of this vim command is:
:echo systemlist('git rev-list -n 1 --all | wc -l')
There are some warnings regarding the use of system()
in the docs and I have noticed that many of tpope's plugins have a custom shellescape()
function and I've never known the reason. When I blindly copy said function from vim-dispatch and apply it to all commands, I actually get an error similar to yours! I'm gonna dig in a little more. It seems like it's a system and/or shell thing.
The vim output is ['1'] I've heard the vim issue mentioned by a different issue on your repo, setting shell=/bin/bash has no effect (as expected on a Fedora system where it is the default shell anyway.
Yeah, I'm thinking it's more of a system issue than a shell issue. I don't think setting the shell makes a difference anymore (and I don't think it affects linux users at all... from memory, it was to get macOS to use the right version of git or something).
:h system()
has a bit of info. I'm going to try some stuff out and push a branch you can try.
Thanks for your patience with this!
I can confirm that the same error somehow persists on my mac partition (running macOS Mojave, with the latest versions of everything installed through brew)
That is so strange. I've been having a very hard time reproducing it. All I can come close to is calling some version of shellescape
and then I get a sort of similar error. I had to stop hacking on it the other day but hopefully get back to it in the next few days. Thanks for the update!
I have the same issue witn nvim
, and I also get ['1']
as output to that command.
I also had the merge in progress
problem. In my case it was because I had the project inside a path with a folder with a space in its name. There were no problems after I moved it to another path without folders with spaces.
Same problem on latest Arch box on Vagrant (https://app.vagrantup.com/archlinux/boxes/archlinux)
I've had the Not a git repository
issue, but seems unlikely it's the same cause. For me, it seems this commit broke something. Specifically, this line:
autocmd VimEnter * if empty(expand('<amatch>'))|call FugitiveDetect(getcwd())|endif
If I add that to my .vimrc
, :Twiggy
seem to work just fine again.
+1 to this issue. Have the same problem.
If I open a file within the repo, and then call :Twiggy, no problem. But with an empty buffer, this problem persists.
Has there ever been a solution for this one. I'm hit by this now too.
Hiya! I absolutely love this plugin, but am also getting this issue since yesterday. Welp! :(
Is there any way to debug this maybe? Using Neovim 0.5.1 on Arch btw.
Hey all,
Apologies for the inattention here.
Does this happen even when you edit a file that is tracked by git? I can reproduce if I open vim in a repo and no file loaded in the current buffer.
I'll take some time today and/or tomorrow to see if I can fix it. Twiggy was my first ever vim-plugin and is full of tech-debt and very odd decisions, so some serious refactoring is in order.
I have the same issue. Open nvim, open Twiggy, same message.
Then I open fugitive :Git
once, and close it. Then Twiggy opens properly without complaining.
Same as @dahmc here. I'm on Fedora using gvim.
The workaround that @j-sv did seems to work in feel cases when starts inside a git project. But if I open a file of this project the error persists. Same for @dahmc advice.
Any solution?
Lazy
config for lazies to make Twiggy
work at the start:
{
"tpope/vim-fugitive",
event = "VeryLazy",
config = function()
vim.cmd("call FugitiveDetect(getcwd())")
end
},
Seems like this needs to be run after each cd
(or session load), so hook appropriately.
Lazy
config for lazies to makeTwiggy
work at the start:{ "tpope/vim-fugitive", event = "VeryLazy", config = function() vim.cmd("call FugitiveDetect(getcwd())") end },
Seems like this needs to be run after each
cd
(or session load), so hook appropriately.
I had the same error on nvim 0.9, macOS 13, Twiggy gave me the "not a git repo" error until after I had used a fugitive command within the session.
Adding this into my lazy config allows me to use Twiggy
before having to do that just fine.
Edit: Actually, that's not the case - I'm back to nvim since october, but still get this error even with the hackfix above...
Trying to use what looks like a fantastic plugin, running into some issues
System Information
Replication
I have removed all other plugins and theming (keeping only fugitive and vim-twiggy) to eliminate other possible causes.
Issue also persists when I try to clone my own GitHub repos (freshly made and existing projects)