geometry-zsh/geometry

Git reports errors in git submodules

JokeNeverSoke opened this issue · 5 comments

On some git directories, the following error pops out: fatal: this operation must be run in a work tree three times

Running on Catalina OS

Can't find any similarities in which git directories share, all I can see is that they're all repos related to web development

can you point me towards a git repo I can clone locally to reproduce?
one way to narrow down where the issue happens, is trying each geometry_git_ function separately than the whole geometry_git

For example, GEOMETRY_RPROMPT=(geometry_git_stashes geometry_git_time geometry_git_branch geometry_git_status geometry_git_rebase geometry_git_remote geometry_git_conflicts)

Then remove one by one until the issue is gone. The one that was last removed exhibits the issue.
Or you can start from nothing and add each one so I can go from there.

Seems that when I test individual git functions they work fine, but once they're all together something happens

Aha, I get it!
It doesn't work when inside a submodule, or a "nested git repo"

To bad I could barely understand shell-code or I'll be able to help

Thanks for doing the legwork! Unfortunately it’s hard for me to recommend a good guide on starting shell scripting, but if you are interested I’d say hang out on #zsh on freenode’s irc network, or just ask here.

I guess the first workaround would be to check if we are in a sub module, and if so echo “submodule” or find some sorta submarine ish or water bubble iconography. We can then figure out something better