Just exit early here, rather than processing anything else.
# Get the status of the working tree
git_prompt_status() {
# Get the status of the working tree
git_prompt_status() {
+ if ! git rev-parse --is-inside-work-tree &>/dev/null; then
+ return
+ fi
local branch ahead behind
local added deleted modified renamed unmerged untracked dirty
# Use porcelain status for easy parsing.
local branch ahead behind
local added deleted modified renamed unmerged untracked dirty
# Use porcelain status for easy parsing.