[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 bd7f007..d99688f 100755 (executable)
@@ -164,6 +164,9 @@ else
        esac
        exit 0
     )
+    saved_err=$?
+    git diff-files --name-status
+    (exit $saved_err)
 fi
 
 #