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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]