cache-tree: use is_empty_tree_oid
[gitweb.git] / merge.c
diff --git a/merge.c b/merge.c
index f06a4773d4f4093d700c652accc79ae17f161a59..5186cb6156f2d37dfeb287f959adbbaf4bb73afc 100644 (file)
--- a/merge.c
+++ b/merge.c
 
 static const char *merge_argument(struct commit *commit)
 {
-       if (commit)
-               return oid_to_hex(&commit->object.oid);
-       else
-               return EMPTY_TREE_SHA1_HEX;
+       return oid_to_hex(commit ? &commit->object.oid : the_hash_algo->empty_tree);
 }
 
 int index_has_changes(struct strbuf *sb)