diff options
author | David Rientjes <rientjes@google.com> | 2006-08-15 13:37:19 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-08-15 15:06:03 -0700 |
commit | 0bef57ee44a2f924ad0066b751a3c87888633f56 (patch) | |
tree | 6ef7a0dacc219c10994f48944e159598e916f88e /builtin-diff.c | |
parent | 3cd4f5e8eb04ae01298ceaf46bb41a4277031916 (diff) | |
download | git-0bef57ee44a2f924ad0066b751a3c87888633f56.tar.gz git-0bef57ee44a2f924ad0066b751a3c87888633f56.tar.xz |
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>
Diffstat (limited to 'builtin-diff.c')
-rw-r--r-- | builtin-diff.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin-diff.c b/builtin-diff.c index 82afce782..40e5c96f3 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; |