Closed yan-foto closed 10 years ago
I understand the reason for this request but I am not sure everyone uses stash in the same fashion. For example, I usually have a stash accumulated with temporary adjustments for easier debugging.
Totally understandable. Maybe in some near future you could add a feature and make it optional.
For future reference, what was the idea you had for visualizing there being a stash? Another keyword as if you are in merge? (e.g. master [stash]
)
I used to use another script to show my git status before I switched to the more "sexy" alternative. They simply used $
to indicate a non-empty stash. Pretty clean and space sparing.
Can you provide a link?
It is included in Drupal QuickStart. See below:
export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWSTASHSTATE=1
export GIT_PS1_SHOWUNTRACKEDFILES=1
export PS1=$IBlack$Time12h$Color_Off'$(git branch &>/dev/null;\
if [ $? -eq 0 ]; then \
echo "$(echo `git status` | grep "nothing to commit" > /dev/null 2>&1; \
if [ "$?" -eq "0" ]; then \
#Clean repository - nothing to commit
echo "'$Green'"$(__git_ps1 " (%s)"); \
else \
# changes to working tree
echo "'$IRed'"$(__git_ps1 " {%s}"); \
fi) '$BYellow$PathShort$Color_Off'\$ "; \
else \
echo " '$Yellow$PathShort$Color_Off'\$ "; \
fi)'
Cool, thanks =)
At your service :)
Is it possible to also show if files are on the stash or not?