This commit is contained in:
Andrii Grytsenko 2013-12-02 23:36:14 -08:00
commit 0126041ef6
3 changed files with 52 additions and 0 deletions

View file

@ -135,6 +135,22 @@ function git_compare_version() {
echo 1
}
function git_prompt_no_changed_files {
if [ ! -d .git ]; then
return
fi
local NO_OF_CHANGED_FILES
NO_OF_CHANGED_FILES=$(git status -s 2> /dev/null | wc -l | sed 's/ *//g')
if [ $NO_OF_CHANGED_FILES != 0 ]; then
echo " $NO_OF_CHANGED_FILES"
else
return
fi
}
#this is unlikely to change so make it all statically assigned
POST_1_7_2_GIT=$(git_compare_version "1.7.2")
#clean up the namespace slightly by removing the checker function