Restore a file's modification time in Git

后端 未结 9 1521
猫巷女王i
猫巷女王i 2020-11-29 01:13

I understand the default Git behaviour of updating the modification time every time it changes a file, but there are times when I want to restore a file\'s original modifica

9条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-29 01:35

    I believe the 'proper' fix is to actually compare the SHA1 of each input file to see if it's changed from the last build.

    This is a lot of work, however I have started a project to try and create a proof of concept (still very early stage). As well as identifying the correct build steps it's also designed to create an audit list of input files for later forensics.

    See http://github.com/alecthegeek/gitbuilding -- it's based on something similar I did a few years ago with SVN

提交回复
热议问题