MestreLion / git-tools

Assorted git tools, including git-restore-mtime
GNU General Public License v3.0
295 stars 74 forks source link

Added option to skip files, which was modified before specific threshold #37

Closed OSemenovBoyarka closed 4 years ago

OSemenovBoyarka commented 4 years ago

The use case for this change is as follows You have a CI job, which builds large make-based project. You cache build results (/out folder, or any intermediate build results) and restore it back on the next CI run. CI runner doesn't clean workspace between runs but could switch branches while building on different branches.

So, for the most runs - we don't need to restore mtime, it's required only if runner switched branches.

This PR adds option, which allows skip restore times of files, which was modified before some threshold, assuming, those files have already correct mtime.