Permalink
Browse files

Suppress dirty marker when not in a repo

  • Loading branch information...
1 parent 943fe11 commit 010de87338a37070395ad5302904fd217b685f66 @phatblat phatblat committed Mar 7, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 git-sh.bash
View
3 git-sh.bash
@@ -183,6 +183,9 @@ ANSI_RESET="\001$(git config --get-color "" "reset")\002"
# detect whether the tree is in a dirty state.
_git_dirty() {
+ if ! git rev-parse --verify HEAD >/dev/null 2>&1; then
+ return 0
+ fi
local dirty_marker="`git config gitsh.dirty 2>/dev/null || echo ' *'`"
if ! git diff --quiet 2>/dev/null ; then

0 comments on commit 010de87

Please sign in to comment.