     ('ignored  (propertize "Ignored " 'face 'git-ignored-face))
     (t "?       ")))
 
-(defun git-file-type-as-string (info)
-  "Return a string describing the file type of INFO."
-  (let* ((old-type (lsh (or (git-fileinfo->old-perm info) 0) -9))
-	 (new-type (lsh (or (git-fileinfo->new-perm info) 0) -9))
+(defun git-file-type-as-string (old-perm new-perm)
+  "Return a string describing the file type based on its permissions."
+  (let* ((old-type (lsh (or old-perm 0) -9))
+	 (new-type (lsh (or new-perm 0) -9))
 	 (str (case new-type
 		(?\100  ;; file
 		 (case old-type

  (let ((info (pop infolist))
        (node (ewoc-nth status 0)))
    (while info
      (setf (git-fileinfo->needs-refresh info) t)
      (cond ((not node)
	     (setq node (ewoc-enter-last status info))
             (setq info (pop infolist)))

                           (git-fileinfo->name info))
              ;; preserve the marked flag
              (setf (git-fileinfo->marked info) (git-fileinfo->marked (ewoc-data node)))
	      (setf (git-fileinfo->needs-refresh info) t)
              (setf (ewoc-data node) info)
              (setq info (pop infolist)))
            (t
