emacs-devel
[Top][All Lists]
Advanced

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

Re: Don't complain about changed file when it hasn't changed


From: Davis Herring
Subject: Re: Don't complain about changed file when it hasn't changed
Date: Mon, 29 Aug 2016 13:10:29 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2

A very basic "checksum" would be to just use the file's size.  We could easily 
implement that and catch most modifications without any real I/O.

Does this work? Many changes don't affect file size, we we would still want to 
prompt the user, right?

I merely meant

If the file size doesn't match, immediately rule the file "changed on disk" without paying for `insert-file-contents'.

as an optimization to prevent most of the I/O cost.

Davis

--
This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.



reply via email to

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