branch: externals/vc-got
commit 8ed796d4347e6530a37aee28080c8c4de842c01e
Author: Omar Polo <[email protected]>
Commit: Omar Polo <[email protected]>
vc-got-dir-status-files: show changes in subdirs
---
vc-got.el | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/vc-got.el b/vc-got.el
index f4121be..43ee10e 100755
--- a/vc-got.el
+++ b/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))))