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

Re: preserving mtime

From
JHJan Hudec <bulb@ucw.cz>
Date
Nov 18, 2007, 09:40 UTC
Message-ID
<20071118094038.GA11861@efreet.light.src>
In-Reply-To
<20071118084511.GC16863@glandium.org>
On Sun, Nov 18, 2007 at 09:45:11 +0100, Mike Hommey wrote:
Show 18 quoted lines
> On Sat, Nov 17, 2007 at 10:22:36AM -0800, Wayne Davison wrote:
> > 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).
 - That would still screw-up make hard. You know, checking out does NOT
   delete any untracked files.
 - There is no such thing as last modification time in git. Because there is
   no file history in git. (Besides, what would be last modification time of
   a file that was last modified in two parents, for example?)
-- 
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
Previous: David BrownNext: Robin Rosenberg
Message 9 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.