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

Re: [RFC] A Change to Commit IDs Too Ridiculous to Consider?

From
Jon Forrest <nobozo@gmail.com>
Date
Jul 25, 2016, 03:56 UTC
Message-ID
<a2910716-efda-51f1-da80-42f6b2d3adb0@gmail.com>
In-Reply-To
<57952834.60706@gmail.com>
>>> Another possibility is to set authordate and committerdate to some
>>> specified time by the way of appropriate environment variables.

To follow up, Jakub's approach works great without requiring any changes to Git.

For example, the following test script always produces the same commit ID:

---- export GIT_AUTHOR_DATE=2005-04-07T22:13:13 export GIT_COMMITTER_DATE=2005-04-07T22:13:13 mkdir -p /tmp/test cd /tmp/test rm -rf .git git init echo "Test" > README git add README git commit -m "test" git log ----

As expected, commenting out the 2 export lines results in different commit IDs each time.

Case closed.
Thanks, Jakub!
Jon Forrest
Previous: Jakub NarębskiNext: Rodrigo Campos
Message 5 of 10 in “[RFC] A Change to Commit IDs Too Ridiculous to Consider?”
  1. Jon ForrestJul 24, 2016
  2. Jakub NarębskiJul 24, 2016
  3. Jon ForrestJul 24, 2016
  4. Jakub NarębskiJul 24, 2016
  5. Jon ForrestJul 25, 2016
  6. Rodrigo CamposJul 24, 2016
  7. Jon ForrestJul 24, 2016
  8. Junio C HamanoJul 25, 2016
  9. Junio C HamanoJul 25, 2016
  10. Philip OakleyJul 26, 2016

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.