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

Git enhancement request - checkout (clone) set modified dates to commit date

From
Andrew Wolfe <andrew@schemaczar.com>
Date
Apr 22, 2018, 17:18 UTC
Message-ID
<585A3A2E-7DA6-4718-BF85-2D17AAAF3EF5@schemaczar.com>
Hello,
there are several timestamps in the lifecycle of a modification to a file in Git:
	• file write timestamp
	• git add timestamp
	• git commit timestamp
	• git push timestamp
	• git merge timestamp
	• git checkout timestamp
Right now when I check out/clone a repository, all the files have the checkout timestamp as
	• ctime - creation time for the file
	• mtime - modification time for the file
	• atime - las access time for the file
Not only does this force more work for timestamp-based build programs, it also deprives me, as a developer, of a visual 'file blame' that could be very useful in spotting changes without having to do git log over and over.
I would like to propose that the checkout process set the create and modification times of a file to the timestamp at which a file was committed.
When repository servers have different clocks - which is normal - each clone/merge/push should record the time offset.  Each timestamp on each commit should be corrected to the repository's specific time, and that should be a marking on the history.
Sincere regards,
Andrew Wolfe
Next: brian m. carlson
Message 1 of 6 in “Git enhancement request - checkout (clone) set modified dates to commit date”
  1. Andrew WolfeApr 22, 2018
  2. brian m. carlsonApr 22, 2018
  3. Andrew WolfeApr 22, 2018
  4. Kevin DaudtApr 22, 2018
  5. Andrew WolfeApr 23, 2018
  6. Jacob KellerApr 23, 2018

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.