summaryrefslogtreecommitdiffstats
path: root/bashrc
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2012-05-11 15:35:51 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2012-05-11 15:35:51 +0200
commit651572c8d07ec48287723073e98daed75046ba31 (patch)
tree703a795b515c097f6c3865446149d582a104180f /bashrc
parent77ed7ae949602598aac8558f21447ef5eee80ab8 (diff)
downloaddotfiles-651572c8d07ec48287723073e98daed75046ba31.tar.gz
dotfiles-651572c8d07ec48287723073e98daed75046ba31.tar.xz
dotfiles-651572c8d07ec48287723073e98daed75046ba31.zip
bash/common/prompt: fix for newer git version
newer git versions print "Changes not staged for commit:" and not "Changed but not updated:" if changed files are in the working dir but not in the index
Diffstat (limited to 'bashrc')
-rw-r--r--bashrc/common/prompt.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/bashrc/common/prompt.sh b/bashrc/common/prompt.sh
index 0311505..0c14d84 100644
--- a/bashrc/common/prompt.sh
+++ b/bashrc/common/prompt.sh
@@ -81,8 +81,12 @@ __make_prompt() {
b=$(git symbolic-ref HEAD 2>/dev/null )
fi
- if git status | grep -q '^# Changed but not updated:' ; then
+ if git status | grep -q '^# Changes not staged for commit:' ; then
a="${a}*"
+ else
+ if git status | grep -q '^# Changed but not updated:' ; then
+ a="${a}*"
+ fi
fi
if git status | grep -q '^# Changes to be committed:' ; then