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 <sand...@crustytoothpaste.net>
---
 builtin/receive-pack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 5f35596c14..c31ceb30c2 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -968,7 +968,7 @@ static const char *push_to_deploy(unsigned char *sha1,
                return "Working directory has unstaged changes";
 
        /* diff-index with either HEAD or an empty tree */
-       diff_index[4] = head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX;
+       diff_index[4] = head_has_history() ? "HEAD" : 
oid_to_hex(the_hash_algo->empty_tree);
 
        child_process_init(&child);
        child.argv = diff_index;

Reply via email to