projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ece716
)
checkout: fix dirty-file display.
author
Junio C Hamano
<junkio@cox.net>
Wed, 15 Feb 2006 00:05:57 +0000
(16:05 -0800)
committer
Junio C Hamano
<junkio@cox.net>
Wed, 15 Feb 2006 00:05:57 +0000
(16:05 -0800)
When we refused to switch branches, we incorrectly showed
differences from the branch we would have switched to.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-checkout.sh
patch
|
blob
|
history
diff --git
a/git-checkout.sh
b/git-checkout.sh
index
6a87c71
..
76e7f55
100755
(executable)
--- a/
git-checkout.sh
+++ b/
git-checkout.sh
@@
-165,8
+165,10
@@
else
exit 0
)
saved_err=$?
- test "$new" = "$old" ||
- git diff-index --name-status "$new"
+ if test "$saved_err" = 0
+ then
+ test "$new" = "$old" || git diff-index --name-status "$new"
+ fi
(exit $saved_err)
fi