When Netlify checks out my git project, I want the the modification date of my files to be that of their last commit date. This is not a feature native to Git, but there are tools such as git-restore-mtime (GitHub - MestreLion/git-tools: Assorted git tools, including git-restore-mtime) which do this.
Git, unlike other version control systems, does not preserve the original timestamp of committed files. Whenever repositories are cloned, or branches/files are checked out, file timestamps are reset to the current date. While this behavior has its justifications (notably when using make to compile software), sometimes it is desirable to restore the original modification date of a file (for example, when generating release tarballs). As git does not provide any way to do that, git-restore-mtime tries to work around this limitation.
The reason why I want this is because my statically generated blog uses the file’s last modified date, and this date keeps on changing every time I create a new build. If the git-restore-mtime package was part of the build environment then I could simply insert git restore-mtime &&
into my build command, the file dates would be what I’d expect them to be, and the Atom feed of my site would have <updated>
attributes that make sense.
Can this package be added? There are official releases for Debian and Ubuntu. Or is there another way to get this package into the $PATH
?