git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Wayne DavisonNext: Martin Langhoff
Message 4 of 14 in “preserving mtime”
  1. Fabrizio PollastriNov 16, 2007
  2. Andreas EricssonNov 16, 2007
  3. Wayne DavisonNov 17, 2007
  4. Mike HommeyNov 18, 2007
  5. Martin LanghoffNov 18, 2007
  6. David BrownNov 18, 2007
  7. Martin LanghoffNov 18, 2007
  8. David BrownNov 18, 2007
  9. Jan HudecNov 18, 2007
  10. Robin RosenbergNov 18, 2007
  11. Johannes SchindelinNov 19, 2007
  12. Jakub NarebskiNov 16, 2007
  13. Junio C HamanoNov 16, 2007
  14. Erik WarendorphNov 16, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.