Raneto icon indicating copy to clipboard operation
Raneto copied to clipboard

Incorrect timestamps due to git clone

Open ryanlelek opened this issue 8 years ago • 2 comments

Using git clone recreates the files locally, and the OS sees this as the "create" date

Normally, this would be fine assuming the deployment wasn't moved and was never re-cloned. However, if multiple deployments are used, there will be a mismatch in "Last updated" date timestamps.

Does anyone know if there is an easy way to base file modification dates on the git history instead of the file system?

ryanlelek avatar Oct 29 '15 07:10 ryanlelek

I don't think it is possible with pure git, see http://stackoverflow.com/questions/1964470/whats-the-equivalent-of-use-commit-times-for-git for more information. In general I (personally) wouldn't want to change modification dates of files, but I could accept say the vcs storing the last modification dates (and/or other metadata) of the files, and applying that for me automatically after I give an option to a clone. But as you can see in that link, git does not provide this.

Of course, you could come up with your own non-git solution or find someone else's solution (like in that thread).

vyp avatar Oct 29 '15 07:10 vyp

I think the best way to take care of this is by adding an optional yaml last_modified: timestamp. I'll look into adding this.

Sparticuz avatar Sep 14 '16 01:09 Sparticuz