emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/vc-got 8ed796d 062/145: vc-got-dir-status-files: show c


From: ELPA Syncer
Subject: [elpa] externals/vc-got 8ed796d 062/145: vc-got-dir-status-files: show changes in subdirs
Date: Thu, 9 Sep 2021 15:58:34 -0400 (EDT)

branch: externals/vc-got
commit 8ed796d4347e6530a37aee28080c8c4de842c01e
Author: Omar Polo <op@omarpolo.com>
Commit: Omar Polo <op@omarpolo.com>

    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))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]