1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-22 13:50:09 +00:00

Merge pull request #1435 from Drarok/fix-svn

Fix backwards svn "dirty" state detection
This commit is contained in:
Robby Russell 2012-12-01 11:41:17 -08:00
commit 2aa485ac04

View file

@ -1,3 +1,4 @@
function svn_prompt_info {
if [ $(in_svn) ]; then
if [ "x$SVN_SHOW_BRANCH" = "xtrue" ]; then
@ -46,9 +47,11 @@ function svn_get_rev_nr {
function svn_dirty_choose {
if [ $(in_svn) ]; then
svn status 2> /dev/null | grep -Eq '^\s*[ACDIM!?L]'
if [ $pipestatus[-1] -ne 0 ]; then
if [ $pipestatus[-1] -eq 0 ]; then
# Grep exits with 0 when "One or more lines were selected", return "dirty".
echo $1
else
# Otherwise, no lines were found, or an error occurred. Return clean.
echo $2
fi
fi