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

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

[elpa] externals/ztree 901c3e3 22/23: support -w for different file size


From: Stefan Monnier
Subject: [elpa] externals/ztree 901c3e3 22/23: support -w for different file size
Date: Thu, 17 Dec 2020 23:17:06 -0500 (EST)

branch: externals/ztree
commit 901c3e3b432029744b76fdcdf31db3d409c83619
Author: webzak <vlad@host>
Commit: webzak <vlad@host>

    support -w for different file size
---
 ztree-diff-model.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/ztree-diff-model.el b/ztree-diff-model.el
index 219ad68..2dc1e4b 100644
--- a/ztree-diff-model.el
+++ b/ztree-diff-model.el
@@ -36,6 +36,9 @@
 (defvar ztree-diff-consider-file-permissions nil
   "Mark files as different if their permissions are different")
 
+(defvar ztree-diff-consider-file-size t
+  "Mark files as different if their size different")
+
 (defvar ztree-diff-additional-options nil
   "Command-line options for the diff program used as a diff backend. These 
options are added to default '-q' option.
 Should be a list of strings.
@@ -156,8 +159,9 @@ Returns t if equal."
   (let* ((file1-untrampified (ztree-untrampify-filename file1))
          (file2-untrampified (ztree-untrampify-filename file2)))
     (if (or
-         (/= (nth 7 (file-attributes file1))
-             (nth 7 (file-attributes file2)))
+         (and ztree-diff-consider-file-size
+              (/= (nth 7 (file-attributes file1))
+              (nth 7 (file-attributes file2))))
          (and ztree-diff-consider-file-permissions
               (not (string-equal (nth 8 (file-attributes file1))
                                  (nth 8 (file-attributes file2)))))



reply via email to

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