sequencer: convert one use of EMPTY_TREE_SHA1_HEX
authorbrian m. carlson <sandals@crustytoothpaste.net>
Wed, 2 May 2018 00:25:58 +0000 (00:25 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 May 2018 04:59:52 +0000 (13:59 +0900)
Convert one use of EMPTY_TREE_SHA1_HEX to use empty_tree_oid_hex to
avoid a dependency on a given hash algorithm.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c
index 667f35ebdffbc1ef730e310cbea9b3dbce786e21..1ccc7782596a5aaceb033c19f6f3db8dd06dff40 100644 (file)
@@ -1480,7 +1480,7 @@ static int do_pick_commit(enum todo_command command, struct commit *commit,
                unborn = get_oid("HEAD", &head);
                if (unborn)
                        oidcpy(&head, the_hash_algo->empty_tree);
-               if (index_differs_from(unborn ? EMPTY_TREE_SHA1_HEX : "HEAD",
+               if (index_differs_from(unborn ? empty_tree_oid_hex() : "HEAD",
                                       NULL, 0))
                        return error_dirty_index(opts);
        }