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

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

[elpa] master 2751b96 1/2: Issue #40: Use process-file instead of shell-


From: Alexey Veretennikov
Subject: [elpa] master 2751b96 1/2: Issue #40: Use process-file instead of shell-command-to-string
Date: Tue, 27 Dec 2016 12:27:50 +0000 (UTC)

branch: master
commit 2751b96aca36cc5c31dc105ec985c269126420a0
Author: Alexey Veretennikov <address@hidden>
Commit: Alexey Veretennikov <address@hidden>

    Issue #40: Use process-file instead of shell-command-to-string
---
 ztree-diff-model.el |   14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/ztree-diff-model.el b/ztree-diff-model.el
index 617f8b8..1f78d62 100644
--- a/ztree-diff-model.el
+++ b/ztree-diff-model.el
@@ -144,15 +144,13 @@ Returns t if equal."
   (unless (ztree-same-host-p file1 file2)
     (error "Compared files are not on the same host"))
   (let* ((file1-untrampified (ztree-untrampify-filename file1))
-         (file2-untrampified (ztree-untrampify-filename file2))
-         (diff-cmd (concat diff-command " -q" " "
-                           (ztree-quotify-string file1-untrampified)
-                           " "
-                           (ztree-quotify-string file2-untrampified))))
-    (if (and 
-         (= (nth 7 (file-attributes file1-untrampified))
+         (file2-untrampified (ztree-untrampify-filename file2)))
+    (if (or 
+         (/= (nth 7 (file-attributes file1-untrampified))
             (nth 7 (file-attributes file2-untrampified)))
-         (> (length (shell-command-to-string diff-cmd)) 2))
+         (/= 0 (process-file diff-command nil nil nil "-q"
+                           file1-untrampified
+                           file2-untrampified)))
         'diff
       'same)))
 



reply via email to

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