[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master eea3c2b 19/36: added comments
From: |
Alexey Veretennikov |
Subject: |
[elpa] master eea3c2b 19/36: added comments |
Date: |
Wed, 27 Jan 2016 23:50:55 +0000 |
branch: master
commit eea3c2b741650f6a4fb354fc05747533e613fbab
Author: Alexey Veretennikov <address@hidden>
Commit: Alexey Veretennikov <address@hidden>
added comments
---
ztree-diff-model.el | 29 ++++++++++++++++-------------
1 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/ztree-diff-model.el b/ztree-diff-model.el
index 3ed1f01..984834c 100644
--- a/ztree-diff-model.el
+++ b/ztree-diff-model.el
@@ -256,18 +256,20 @@ If IS-DIR searching for directories; assume files
otherwise"
(let* ((list1 (ztree-directory-files (ztree-diff-node-left-path node))) ;;
left list of liles
(list2 (ztree-directory-files (ztree-diff-node-right-path node))) ;;
right list of files
(diff-status 'same) ;; status of this node
- (parent (ztree-diff-node-parent node))
- (ignore-status ;; if all children should be ignored
- ;; when parent defined and its status is 'ignore
- (or (and parent (eql (ztree-diff-node-different parent) 'ignore))
- ;; or parent defined and node is in ignore list
- (and parent (ztree-diff-model-ignore-p node))))
- (children-status (if ignore-status 'ignore 'new))
- (children nil)) ;; children
+ (parent (ztree-diff-node-parent node))
+ ;; when parent defined and its status is 'ignore
+ (parent-ignored
+ (and parent (eql (ztree-diff-node-different parent) 'ignore)))
+ ;; status automatically assigned to children of the node when
+ ;; they shouldn't be compared
+ (children-status (if parent-ignored 'ignore 'new))
+ (children nil)) ;; list of children
;; update waiting status
(ztree-diff-model-update-wait-message)
- ;; update node status if ignore
- (when ignore-status
+ ;; update node status ignore status either inhereted from the
+ ;; parent or the own
+ (when (or parent-ignored
+ (and parent (ztree-diff-model-ignore-p node)))
(ztree-diff-node-set-different node 'ignore)
(setf diff-status 'ignore))
;; first - adding all entries from left directory
@@ -284,7 +286,7 @@ If IS-DIR searching for directories; assume files otherwise"
(file2 (ztree-diff-model-find-in-files list2 simple-name isdir)))
;; entry set right path if found or nil otherwise
(ztree-diff-node-set-right-path child file2)
- ;; update child own status
+ ;; update child own ignore status
(when (ztree-diff-model-ignore-p child)
(ztree-diff-node-set-different child 'ignore))
(cond
@@ -295,7 +297,8 @@ If IS-DIR searching for directories; assume files otherwise"
file1
'left
(ztree-diff-node-different child))))
- ;; if exists on both sides and it is a file, compare
+ ;; if 1) exists on both sides and 2) it is a file
+ ;; and 3) not ignored file
((and file2 (not isdir) (not (eql (ztree-diff-node-different child)
'ignore)))
(ztree-diff-node-set-different child
(ztree-diff-model-files-equal file1
file2)))
@@ -332,7 +335,7 @@ If IS-DIR searching for directories; assume files otherwise"
(push child children))))
;; finally set different status based on all children
;; depending if the node should participate in overall result
- (unless ignore-status
+ (unless parent-ignored
(setq diff-status (cl-reduce 'ztree-diff-model-update-diff
children
:initial-value diff-status
- [elpa] master 45b6921 09/36: Updated print function, (continued)
- [elpa] master 45b6921 09/36: Updated print function, Alexey Veretennikov, 2016/01/27
- [elpa] master 04b29c8 06/36: Updated readme, Alexey Veretennikov, 2016/01/27
- [elpa] master 67b9b4b 03/36: Issue #24: updated traverse function, Alexey Veretennikov, 2016/01/27
- [elpa] master 4a935ee 07/36: Reshuffled readme, Alexey Veretennikov, 2016/01/27
- [elpa] master 6018029 11/36: Started updating diff logic to include ignored files, Alexey Veretennikov, 2016/01/27
- [elpa] master c227ed8 12/36: Added debug output and some other changes, Alexey Veretennikov, 2016/01/27
- [elpa] master 64d3960 13/36: Added face for ignored files, Alexey Veretennikov, 2016/01/27
- [elpa] master 45dda44 14/36: Started updating diff logic to include ignored files, Alexey Veretennikov, 2016/01/27
- [elpa] master 2dc412f 15/36: Added debug output and some other changes, Alexey Veretennikov, 2016/01/27
- [elpa] master 9408ca1 17/36: Fixed ztree-node-is-visible, Alexey Veretennikov, 2016/01/27
- [elpa] master eea3c2b 19/36: added comments,
Alexey Veretennikov <=
- [elpa] master cef7d95 20/36: Functions with errors still:, Alexey Veretennikov, 2016/01/27
- [elpa] master 653a7f1 21/36: Fixed ignored files, Alexey Veretennikov, 2016/01/27
- [elpa] master a27dbbd 22/36: Started to fix issues with delete file, Alexey Veretennikov, 2016/01/27
- [elpa] master c3144bd 16/36: Updated model - ignored files still not handled, Alexey Veretennikov, 2016/01/27
- [elpa] master bc6a12a 18/36: Traverse function now supports ignored, Alexey Veretennikov, 2016/01/27
- [elpa] master b021697 29/36: Added comment to not to forget to update copy procedure., Alexey Veretennikov, 2016/01/27
- [elpa] master da721ab 33/36: Fixed compile warnings, Alexey Veretennikov, 2016/01/27
- [elpa] master be4e000 24/36: Fix typo in value of Created header keyword, Alexey Veretennikov, 2016/01/27
- [elpa] master b5b2d02 32/36: removed test files, Alexey Veretennikov, 2016/01/27
- [elpa] master 74899aa 30/36: Merge branch 'master' of github.com:fourier/ztree, Alexey Veretennikov, 2016/01/27