     (with-temp-buffer
       (apply #'git-call-process-env t nil "ls-files" "-z" "-s" "-c" "--" files)
       (goto-char (point-min))
-      (while (re-search-forward "\\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} [0-3]\t\\([^\0]+\\)\0" nil t)
+      (while (re-search-forward "\\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} 0\t\\([^\0]+\\)\0" nil t)
 	(let* ((new-perm (string-to-number (match-string 1) 8))
 	       (old-perm (if (eq default-state 'added) 0 new-perm))
 	       (name (match-string 2)))

              (setf (ewoc-data node) info)
              (setq info (pop infolist)))
            (t
             (ewoc-enter-before status node info)
             (setq info (pop infolist)))))))

(defun git-run-diff-index (status files)

    (while info
      (setf (git-fileinfo->needs-refresh info) t)
      (cond ((not node)
	     (setq node (ewoc-enter-last status info))
             (setq info (pop infolist)))
            ((string-lessp (git-fileinfo->name (ewoc-data node))
                           (git-fileinfo->name info))
