Skip to content

Commit 980d8ce

Browse files
author
Junio C Hamano
committed
[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>
1 parent 9e9b267 commit 980d8ce

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

git-checkout.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ else
164164
esac
165165
exit 0
166166
)
167+
saved_err=$?
168+
git diff-files --name-status
169+
(exit $saved_err)
167170
fi
168171

169172
#

0 commit comments

Comments
 (0)