From 651572c8d07ec48287723073e98daed75046ba31 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Fri, 11 May 2012 15:35:51 +0200 Subject: 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 --- bashrc/common/prompt.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3