packed objects: minor cleanup
[gitweb.git] / git-checkout.sh
index d99688fbf2930235a01385efdd2dbc0729e660ee..6a87c717e9cb8f0358ceca85ec7df8cf44f625d5 100755 (executable)
@@ -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