Re: [PATCH] make inline is_null_sha1 global
David Rientjes <rientjes@google.com> wrote Tue, Aug 15, 2006:
Show 14 quoted lines
> diff --git a/builtin-diff.c b/builtin-diff.c
> index 82afce7..9003d55 100644
> --- a/builtin-diff.c
> +++ b/builtin-diff.c
> @@ -68,8 +68,7 @@ static void stuff_change(struct diff_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;
> Looks like this should be !is_null_sha1(...) in both cases.
--
Jonas Fonseca