[PATCH] checkout: show dirty state upon switching branches.
authorJunio C Hamano <junkio@cox.net>
Sat, 14 Jan 2006 20:31:18 +0000 (12:31 -0800)
committerJunio C Hamano <junkio@cox.net>
Sat, 14 Jan 2006 21:18:28 +0000 (13:18 -0800)
This shows your working file state when you switch branches.  As
a side effect, "git checkout" without any branch name (i.e. stay
on the current branch) becomes a more concise shorthand for the
"git status" command.

Signed-off-by: Junio C Hamano <junkio@cox.net>
git-checkout.sh

index bd7f007307d458efec2cdd333dc9028402482f57..d99688fbf2930235a01385efdd2dbc0729e660ee 100755 (executable)
@@ -164,6 +164,9 @@ else
        esac
        exit 0
     )
+    saved_err=$?
+    git diff-files --name-status
+    (exit $saved_err)
 fi
 
 #