summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-checkout.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-checkout.sh b/git-checkout.sh
index d99688fbf2..6a87c717e9 100755
--- a/git-checkout.sh
+++ b/git-checkout.sh
@@ -165,7 +165,8 @@ else
exit 0
)
saved_err=$?
- git diff-files --name-status
+ test "$new" = "$old" ||
+ git diff-index --name-status "$new"
(exit $saved_err)
fi