summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 024701f)
raw | patch | inline | side by side (parent: 024701f)
author | Junio C Hamano <junkio@cox.net> | |
Sun, 12 Feb 2006 21:05:53 +0000 (13:05 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 12 Feb 2006 21:05:53 +0000 (13:05 -0800) |
Earlier, when we switched a branch we used diff-files to show
paths that are dirty in the working tree. But we allow switching
branches with updated index ("read-tree -m -u $old $new" works that
way), and only showing paths that have differences in the working
tree but not paths that are different in index was confusing.
This shows both as modified from the top commit of the branch we
just have switched to.
Signed-off-by: Junio C Hamano <junkio@cox.net>
paths that are dirty in the working tree. But we allow switching
branches with updated index ("read-tree -m -u $old $new" works that
way), and only showing paths that have differences in the working
tree but not paths that are different in index was confusing.
This shows both as modified from the top commit of the branch we
just 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 d99688fbf2930235a01385efdd2dbc0729e660ee..6a87c717e9cb8f0358ceca85ec7df8cf44f625d5 100755 (executable)
--- a/git-checkout.sh
+++ b/git-checkout.sh
exit 0
)
saved_err=$?
- git diff-files --name-status
+ test "$new" = "$old" ||
+ git diff-index --name-status "$new"
(exit $saved_err)
fi