Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2006-08-16 00:37:19 +0400
committerJunio C Hamano <junkio@cox.net>2006-08-16 02:06:03 +0400
commit0bef57ee44a2f924ad0066b751a3c87888633f56 (patch)
tree6ef7a0dacc219c10994f48944e159598e916f88e /diff.c
parent3cd4f5e8eb04ae01298ceaf46bb41a4277031916 (diff)
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 'diff.c')
-rw-r--r--diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/diff.c b/diff.c
index 2327e6065b..6a8c0c9c01 100644
--- a/diff.c
+++ b/diff.c
@@ -1102,7 +1102,7 @@ void fill_filespec(struct diff_filespec *spec, const unsigned char *sha1,
if (mode) {
spec->mode = canon_mode(mode);
memcpy(spec->sha1, sha1, 20);
- spec->sha1_valid = !!memcmp(sha1, null_sha1, 20);
+ spec->sha1_valid = !is_null_sha1(sha1);
}
}