git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Forrest <nobozo@gmail.com>
To: "Jakub Narębski" <jnareb@gmail.com>, git@vger.kernel.org
Subject: Re: [RFC] A Change to Commit IDs Too Ridiculous to Consider?
Date: Sun, 24 Jul 2016 20:56:52 -0700	[thread overview]
Message-ID: <a2910716-efda-51f1-da80-42f6b2d3adb0@gmail.com> (raw)
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


  reply	other threads:[~2016-07-25  3:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-24 18:12 [RFC] A Change to Commit IDs Too Ridiculous to Consider? Jon Forrest
2016-07-24 18:46 ` Jakub Narębski
2016-07-24 19:20   ` Jon Forrest
2016-07-24 20:42     ` Jakub Narębski
2016-07-25  3:56       ` Jon Forrest [this message]
2016-07-24 18:51 ` Rodrigo Campos
2016-07-24 19:57   ` Jon Forrest
2016-07-25 15:03     ` Junio C Hamano
2016-07-25 17:11       ` Junio C Hamano
2016-07-26 14:26     ` Philip Oakley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a2910716-efda-51f1-da80-42f6b2d3adb0@gmail.com \
    --to=nobozo@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).