[PATCH 29/41] sequencer: convert one use of EMPTY_TREE_SHA1_HEX

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

 



Convert one use of EMPTY_TREE_SHA1_HEX to use oid_to_hex and
the_hash_algo to avoid a dependency on a given hash algorithm.

Signed-off-by: brian m. carlson <sandals@xxxxxxxxxxxxxxxxxxxx>
---
 sequencer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sequencer.c b/sequencer.c
index 667f35ebdf..b879593486 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -1480,7 +1480,8 @@ 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 ?
+				       oid_to_hex(the_hash_algo->empty_tree) : "HEAD",
 				       NULL, 0))
 			return error_dirty_index(opts);
 	}



[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]

  Powered by Linux