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 <rientjes@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
committed by
Junio C Hamano
parent
3cd4f5e8eb
commit
0bef57ee44
@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user