[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ztree 369fd05 10/23: Issue #50: Show file permission di
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ztree 369fd05 10/23: Issue #50: Show file permission differences |
Date: |
Thu, 17 Dec 2020 23:17:04 -0500 (EST) |
branch: externals/ztree
commit 369fd05e8a2d18679103e57d1a3f8dc689bb6eff
Author: Alexey Veretennikov <txm.fourier@gmail.com>
Commit: Alexey Veretennikov <txm.fourier@gmail.com>
Issue #50: Show file permission differences
Added variable ztree-diff-consider-file-permissions (turned off
by default) which controls whether file permissions shall
be taken into consideration when comparing files.
---
README.md | 2 ++
ztree-diff-model.el | 8 +++++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 200843a..d7ac308 100644
--- a/README.md
+++ b/README.md
@@ -58,6 +58,8 @@ By default all files starting with dot (like `.gitignore`)
are not shown and exc
One also could turn on unicode characters to draw the tree with instead of
normal ASCII-characters. This is controlled by the `ztree-draw-unicode-lines`
variable.
+The variable `ztree-diff-consider-file-permissions` (which is `nil` by
default) if set to `t` allows to compare file attributes as well, the files
will be considered different if they have different mode.
+
### Screenshots
![ztreediff
emacsx11](https://github.com/fourier/ztree/raw/screenshots/screenshots/emacs_diff_xterm.png
"Emacs in xterm with ztree-diff")
diff --git a/ztree-diff-model.el b/ztree-diff-model.el
index 6f4c951..d31ce34 100644
--- a/ztree-diff-model.el
+++ b/ztree-diff-model.el
@@ -33,6 +33,9 @@
(require 'ztree-util)
(eval-when-compile (require 'cl-lib))
+(defvar ztree-diff-consider-file-permissions nil
+ "Mark files as different if their permissions are different")
+
(defvar-local ztree-diff-model-ignore-fun nil
"Function which determines if the node should be excluded from comparison.")
@@ -147,7 +150,10 @@ Returns t if equal."
(file2-untrampified (ztree-untrampify-filename file2)))
(if (or
(/= (nth 7 (file-attributes file1))
- (nth 7 (file-attributes file2)))
+ (nth 7 (file-attributes file2)))
+ (and ztree-diff-consider-file-permissions
+ (not (string-equal (nth 8 (file-attributes file1))
+ (nth 8 (file-attributes file2)))))
(/= 0 (process-file diff-command nil nil nil "-q"
file1-untrampified
file2-untrampified)))
- [elpa] externals/ztree updated (3a4df17 -> 0a5b25f), Stefan Monnier, 2020/12/17
- [elpa] externals/ztree 11c6e3b 02/23: Address PR feedback, Stefan Monnier, 2020/12/17
- [elpa] externals/ztree 47a6e40 03/23: Do not kill Ediff registry buffer, Stefan Monnier, 2020/12/17
- [elpa] externals/ztree 3315ecd 01/23: Address #38, #39, Stefan Monnier, 2020/12/17
- [elpa] externals/ztree bf34366 04/23: Merge pull request #45 from xiongtx/ediff-restore, Stefan Monnier, 2020/12/17
- [elpa] externals/ztree 20b9c93 05/23: toggle show orphaned files, Stefan Monnier, 2020/12/17
- [elpa] externals/ztree febc2d0 06/23: Merge pull request #46 from Iurie/master, Stefan Monnier, 2020/12/17
- [elpa] externals/ztree 0e0a39d 09/23: Issue #56: Preserve line/column position on refresh, Stefan Monnier, 2020/12/17
- [elpa] externals/ztree 67a1d90 11/23: Issue #56: Dont preserve a cursor position on widen/narrow operations, Stefan Monnier, 2020/12/17
- [elpa] externals/ztree 369fd05 10/23: Issue #50: Show file permission differences,
Stefan Monnier <=
- [elpa] externals/ztree 00d3318 12/23: Issue #59: Position curson on the beginning of the text, Stefan Monnier, 2020/12/17
- [elpa] externals/ztree 3273e1f 13/23: Issue #60: ztree-dir change Emacs default directory, Stefan Monnier, 2020/12/17
- [elpa] externals/ztree a3e0442 14/23: Issue #59: Place cursor at the beginning of the text, Stefan Monnier, 2020/12/17
- [elpa] externals/ztree 2f62ba7 18/23: Issue #62: Cleared warnings, Stefan Monnier, 2020/12/17
- [elpa] externals/ztree 4879576 19/23: Issue #39: restore cursor position and window configuration, Stefan Monnier, 2020/12/17
- [elpa] externals/ztree c54425a 21/23: Updated README for issue #65., Stefan Monnier, 2020/12/17
- [elpa] externals/ztree d078daf 08/23: Issue #54: Added (optional) number of directory entries, Stefan Monnier, 2020/12/17
- [elpa] externals/ztree c5a1190 15/23: Issue #61: Error on unaccessible directory contents, Stefan Monnier, 2020/12/17
- [elpa] externals/ztree 0a5b25f 23/23: Merge pull request #68 from webzak/fix_ws_ignore, Stefan Monnier, 2020/12/17
- [elpa] externals/ztree 1ebb00c 07/23: Issue #52: Added 'd' hotkey for the ztree-dir to open dired., Stefan Monnier, 2020/12/17