Re: preserving mtime
- From
Mike Hommey <mh@glandium.org>
- Date
- Nov 18, 2007, 08:45 UTC
- Message-ID
- <20071118084511.GC16863@glandium.org>
- In-Reply-To
- <20071117182236.GD23659@blorf.net>
On Sat, Nov 17, 2007 at 10:22:36AM -0800, Wayne Davison wrote:
Show 14 quoted lines
> On Fri, Nov 16, 2007 at 11:15:34AM +0100, Andreas Ericsson wrote: > >> is it possible to tell git to preserve the file modification time in > >> a checked out copy? > > > Fabrizio Pollastri wrote: > > No. Doing so would seriously break build-systems. > > I wish that the initial clone would set the modification time to the > commit time. It would make the intial checkout have a more accurate > representation of when a file was last changed instead of all files > being set to the clone date. Then, files that are being updated would > get their time set as they do now. I supposed I'll just use the handy > git-set-file-times script (mentioned in another reply) every time I do > a clone.
For completeness, it would make sense to do so every time you git checkout (like, when switching branches).
Mike