Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use filetimes in check_integrity #1162

Merged
merged 3 commits into from
Sep 19, 2024
Merged

Use filetimes in check_integrity #1162

merged 3 commits into from
Sep 19, 2024

Conversation

wyattscarpenter
Copy link
Contributor

Before this change, if you changed the documentation in foo.md, check_integrity.sh would not warn you that you had to update foo.html and foo.1. This is bad, because then the derived files could get out of sync. (It also was not checked by the CI, which also just uses check_integrity.sh)

This PR makes 4 changes:

  1. check_integrity.sh now tells if you've updated the md since you updated the html and man page, using the file modified times. I got this idea from the tool we use to generate the files, which also checks that, which is why you have to touch the md if you want it to generate fresh derived files.
  2. To facilitate the first point, check_integrity.sh now calls our very own git-utimes --newer in order to give the files the correct file modified times. This always runs, which has the downside of taking a couple more seconds. It has the upside of being simple, and always correct. (Well, I guess it could technically become incorrect if you deliberately touched the md to before the previous git commit date for it. But you can only cheat yourself that way.)
  3. If check_integrity.sh is given no arguments, it checks the integrity of all the commands. This uses the $(find bin | cut -b 5- | xargs) method of getting all the command names, that was previously in the CI.
  4. Update git-extras, which was out of sync.

…e check_integrity run git-utimes first

this has the downside that the script now takes a little longer. But the upside that it guarantees more correctness.
using the incredible power of the new script, I have detected this was out of date, out of sync, etc
@spacewander spacewander merged commit 4d2d393 into tj:main Sep 19, 2024
5 checks passed
@spacewander
Copy link
Collaborator

Merged. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants