Skip to content
This repository has been archived by the owner on Jun 17, 2023. It is now read-only.

Show file permission differences #50

Closed
Ambrevar opened this issue Aug 4, 2017 · 7 comments
Closed

Show file permission differences #50

Ambrevar opened this issue Aug 4, 2017 · 7 comments

Comments

@Ambrevar
Copy link

Ambrevar commented Aug 4, 2017

I got bitten hard today by an assumption I made, namely that ztree would show file permission differences.

It's an important feature for a file comparison tool, I would love to see this implemented.

@fourier
Copy link
Owner

fourier commented Sep 13, 2017

Thanks for reporting. I'll take a look on how to get file permissions in GNU Emacs; command-line diff tool which I use to compare files doesn't know about file permissions. Out of curiosity, what is the use-case for this feature? I never ever needed anything like this in my professional carrier.

@Ambrevar
Copy link
Author

Indeed, regular diff tools don't do it. The only tools I know which do this are rsync (e.g. rsync -nirv --perms --size-only DIR1/ DIR2) and Beyond Compare (proprietary).

Use case? Well, file attributes contribute to what defines the files, don't they? Otherwise they would not be there. tar can store them, rsync can sync them, git preserves them, etc.

More specifically: I was working on product with a huge number of files. I had 2 versions, 1 was working, the other one was crashing. I couldn't figure out why since both file trees were identical according to ztree. Until I found out that some executables had had their x flag taken away at some point...

fourier added a commit that referenced this issue Feb 14, 2018
Added variable ztree-diff-consider-file-permissions (turned off
by default) which controls whether file permissions shall
be taken into consideration when comparing files.
@fourier
Copy link
Owner

fourier commented Feb 14, 2018

Hi @Ambrevar , please try the recent version, it will show files with different modes (+x/-x etc) os differences. It doesn't show though what are the differences (yet).

@fourier
Copy link
Owner

fourier commented Feb 14, 2018

Forgot to mention: you have to add (setq ztree-diff-consider-file-permissions t) to your config in order for this feature to be active.

@Ambrevar
Copy link
Author

Nice! Thanks for that one! Waiting for more visual details then :D

@Ambrevar
Copy link
Author

I just tested and it works like a charm!

@fourier
Copy link
Owner

fourier commented Feb 15, 2018

Great. I'll close this issue for now then and open #57 as an enhancement.

@fourier fourier closed this as completed Feb 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants