On 08/24/2015 11:54 AM, Richard Earnshaw wrote:
Why not use the output of 'git show -s --format=%ct-%h'?
$ git show -s --format=%ct-%h master
1440153969-f57da59
That gives you a unix timestamp for the commit, followed by the hash.
Now you've got a fully ordered way of referring to the commit, but still
have access to the hash code.
You don't even need to worry about the hash code, you can use the
timestamp by itself. Given the timestamp,
git log -1 --until 1440153969
will show you the relevant commit, or
git rev-list HEAD --max-count=1 --until 1440153969
will give you the hash.
So that seems like a suitable monotonically increasing identifier. What
do you think, Jakub?
Jason