# ensure index is up to date
#git update-index --really-refresh -q &>/dev/null
- # check for uncommitted changes in the index
- if ! $(git diff --quiet --ignore-submodules --cached); then
- s="$s+";
- fi
-
# check for unstaged changes
if [ -n "$(git ls-files --modified)" ]; then
s="$s*";
fi
- # check for untracked files
- if [ -n "$(git ls-files --others --exclude-standard)" ]; then
- s="$s%";
+ # check for uncommitted changes in the index
+ if ! $(git diff --quiet --ignore-submodules --cached); then
+ s="$s+";
fi
# check for stashed files
s="$s$";
fi
+ # check for untracked files
+ if [ -n "$(git ls-files --others --exclude-standard)" ]; then
+ s="$s%";
+ fi
+
fi
# get the short symbolic ref