t1405: sort reflog entries in a hash-independent way
commit64af7752bb3682200da0e7d3c8fc0821d2609566
authorbrian m. carlson <sandals@crustytoothpaste.net>
Sun, 25 Mar 2018 19:20:49 +0000 (25 19:20 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 26 Mar 2018 22:10:48 +0000 (26 15:10 -0700)
tree8fde8d656624c51d174738c47c8601c1d557e5ca
parent0dc3ad99d21d6456f395165fa27967e4866f329b
t1405: sort reflog entries in a hash-independent way

The test enumerates reflog entries in an arbitrary order and then sorts
them.  For SHA-1, this produces results that happen to sort in
alphabetical order, but for other hash algorithms they sort differently.
Ensure we sort the reflog entries in a hash-independent way by sorting
on the ref name instead of the object ID.  Remove an assumption about
the length of a hash by using cut with the delimiter and field options
instead of the character range option.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1405-main-ref-store.sh