Closed sshimko closed 5 years ago
Now that I think about it - should this explicitly clear out the git* user variables when git rev-parse returns an error indicating you aren't in a git repo?
The pushed update seems to work as expected and clears out the variables. Specifically, I noticed issues when SSH'ing from a local git repo to a remote host outside of a git repo. In the previous version of this patch the status bar still reflected the git repo information from the local host.
Some day I will understand rev-parse, but it may require ascending to a higher state of being. Thank you for the fix!
Check to see if PWD is in a git repo before running subsequent commands that are only useful within a git repo.