[PATCH v2 37/42] sequencer: use the_hash_algo for empty tree object ID

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

 



To ensure that we are hash algorithm agnostic, use the_hash_algo to look
up the object ID for the empty tree instead of using the empty_tree_oid
variable.

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

diff --git a/sequencer.c b/sequencer.c
index 75ed9676fe..a487411fde 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -1120,7 +1120,7 @@ static int try_to_commit(struct strbuf *msg, const char *author,
 
 	if (!(flags & ALLOW_EMPTY) && !oidcmp(current_head ?
 					      &current_head->tree->object.oid :
-					      &empty_tree_oid, &tree)) {
+					      the_hash_algo->empty_tree, &tree)) {
 		res = 1; /* run 'git commit' to display error message */
 		goto out;
 	}



[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