0

We have migrated to git recently, from SVN.

Due to unrelated reasons, for our build to work, we have configured SVN to time stamp the files with SVN time stamps when one does a checkout.

in git, is there a similar configuration parameter to ensure that the cloned files have the same timestamp as in the repository?

reza
  • 5,972
  • 15
  • 84
  • 126
  • Is a dupe of http://stackoverflow.com/q/2458042/422353? I think Git still doesn't have an option for this beahviour. – madth3 Mar 28 '12 at 17:16

2 Answers2

1

No. You have to use another flag for your build-system

Lazy Badger
  • 94,711
  • 9
  • 78
  • 110
0

Git compares files using a hash of the file data, so the timestamps don't have to match between your cloned files and the repository, just the content.

You could edit a file, undo the edits and save and because git sees the content has not changed, the file would still be considered identical to the repository.

Narbs
  • 31
  • 2
  • 1
    @reza stated the he wanted to preserve the repository timestamps "Due to unrelated reasons, for our build to work", not because Git would require it. – madth3 Mar 28 '12 at 17:24