merge: convert empty tree constant to the_hash_algo
authorbrian m. carlson <sandals@crustytoothpaste.net>
Wed, 2 May 2018 00:25:57 +0000 (00:25 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 May 2018 04:59:52 +0000 (13:59 +0900)
commite9fe6f262eab9a262100cbd60355b8c0f346ff59
treed53aae66667578304f5c2df4062a8d51214de33b
parentcb91022c0e6d5e926d009156c1aea7dc137ddefd
merge: convert empty tree constant to the_hash_algo

To avoid dependency on a particular hash algorithm, convert a use of
EMPTY_TREE_SHA1_HEX to use the_hash_algo->empty_tree instead.  Since
both branches now use oid_to_hex, condense the if statement into a
ternary.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
merge.c