summaryrefslogtreecommitdiff
path: root/git-checkout.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-01-14 20:31:18 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-01-14 21:18:28 (GMT)
commit980d8ce551784b76e05077946b8a4f2ac6c5305d (patch)
tree0444b86b45442918fde055002b389547cf4fc6d3 /git-checkout.sh
parent9e9b26751a5ca7a257b3e1cfb319fe3e4efc663c (diff)
downloadgit-980d8ce551784b76e05077946b8a4f2ac6c5305d.zip
git-980d8ce551784b76e05077946b8a4f2ac6c5305d.tar.gz
git-980d8ce551784b76e05077946b8a4f2ac6c5305d.tar.bz2
[PATCH] checkout: show dirty state upon switching branches.
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>
Diffstat (limited to 'git-checkout.sh')
-rwxr-xr-xgit-checkout.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/git-checkout.sh b/git-checkout.sh
index bd7f007..d99688f 100755
--- a/git-checkout.sh
+++ b/git-checkout.sh
@@ -164,6 +164,9 @@ else
esac
exit 0
)
+ saved_err=$?
+ git diff-files --name-status
+ (exit $saved_err)
fi
#