commit 8ed796d4347e6530a37aee28080c8c4de842c01e from: Omar Polo date: Mon Jan 04 13:59:19 2021 UTC vc-got-dir-status-files: show changes in subdirs commit - 7a5ead659d51fa249e2af1fcbf0ad79e969e5204 commit + 8ed796d4347e6530a37aee28080c8c4de842c01e blob - f4121be3feb070ae066dc0f81880d080e4d30251 blob + 43ee10e2ddad4a6c4ceb6a3f89b4452da0fbc91f --- vc-got.el +++ vc-got.el @@ -376,21 +376,16 @@ DIR-OR-FILE." (or files (directory-files dir)))) (stats (vc-got--parse-status (apply #'vc-got--status dir files))) - (res)) - ;; collect deleted and removed files - (cl-loop for (file . st) in stats - do (when (or (eq st 'missing) - (eq st 'removed)) - (push (list file st nil) res))) + (res (mapcar (lambda (x) + (list (car x) (cdr x) nil)) + stats))) (cl-loop for file in fs - do (let ((s (if (file-directory-p file) - (list file 'unregistered nil) - (if-let (status (cdr (assoc file stats #'string=))) - (list file status nil) + do (let ((s (unless (or (cdr (assoc file stats #'string=)) + (file-directory-p file)) + (when (file-exists-p file) ;; if file doesn't exists, it's a ;; untracked file that was removed. - (when (file-exists-p file) - (list file 'up-to-date nil)))))) + (list file 'up-to-date nil))))) (when s (push s res))) finally (funcall update-function res nil))))