Closed sjoerdjob closed 3 years ago
When one runs djhtml -i, the "create timestamp" of the file is changed even when the contents is not.
djhtml -i
% ls -hal tst* ... 78B May 17 15:19 tst.html ... 38B May 17 15:19 tst.py % shasum tst* 0c2f9c91c8d22ad4f60aff6c155400a695cf0323 tst.html 291ee7e335a86d6e29f6e0abc0f4d85eef252287 tst.py % djhtml -i tst.html Successfully reformatted tst.html % black tst.py All done! ✨ 🍰 ✨ 1 file left unchanged. % shasum tst* 0c2f9c91c8d22ad4f60aff6c155400a695cf0323 tst.html 291ee7e335a86d6e29f6e0abc0f4d85eef252287 tst.py % ls -hal tst* ... 78B May 17 15:20 tst.html ... 38B May 17 15:19 tst.py
As you can see, black keeps the file unchanged (and thus: the old timestamp), while djhtml writes a new file (and thus: a new timestamp).
black
djhtml
Ideally djhtml would report which files are and are not changed, and in particular: not write a new file when it would have the same contents.
Thank you for another great suggestion! I've assigned myself to this issue and will publish an update shortly!
When one runs
djhtml -i
, the "create timestamp" of the file is changed even when the contents is not.As you can see,
black
keeps the file unchanged (and thus: the old timestamp), whiledjhtml
writes a new file (and thus: a new timestamp).Ideally
djhtml
would report which files are and are not changed, and in particular: not write a new file when it would have the same contents.