From 0bef57ee44a2f924ad0066b751a3c87888633f56 Mon Sep 17 00:00:00 2001 From: David Rientjes Date: Tue, 15 Aug 2006 13:37:19 -0700 Subject: make inline is_null_sha1 global Replace sha1 comparisons to null_sha1 with a global inline (which previously an unused static inline in builtin-apply.c) [jc: with a fix from Jonas Fonseca.] Signed-off-by: David Rientjes Signed-off-by: Junio C Hamano --- builtin-diff.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'builtin-diff.c') diff --git a/builtin-diff.c b/builtin-diff.c index 82afce782d..40e5c96f30 100644 --- a/builtin-diff.c +++ b/builtin-diff.c @@ -68,8 +68,7 @@ static void stuff_change(struct diff_options *opt, { struct diff_filespec *one, *two; - if (memcmp(null_sha1, old_sha1, 20) && - memcmp(null_sha1, new_sha1, 20) && + if (!is_null_sha1(old_sha1) && !is_null_sha1(new_sha1) && !memcmp(old_sha1, new_sha1, 20)) return; -- cgit v1.2.3