summaryrefslogtreecommitdiff
path: root/combine-diff.c
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2006-08-15 13:37:19 -0700
committerJunio C Hamano <junkio@cox.net>2006-08-15 15:06:03 -0700
commit0bef57ee44a2f924ad0066b751a3c87888633f56 (patch)
tree6ef7a0dacc219c10994f48944e159598e916f88e /combine-diff.c
parent3cd4f5e8eb04ae01298ceaf46bb41a4277031916 (diff)
downloadgit-0bef57ee44a2f924ad0066b751a3c87888633f56.tar.gz
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 'combine-diff.c')
-rw-r--r--combine-diff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/combine-diff.c b/combine-diff.c
index 4c6bfed56e..ce063b4ffa 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -94,7 +94,7 @@ static char *grab_blob(const unsigned char *sha1, unsigned long *size)
{
char *blob;
char type[20];
- if (!memcmp(sha1, null_sha1, 20)) {
+ if (is_null_sha1(sha1)) {
/* deleted blob */
*size = 0;
return xcalloc(1, 1);
@@ -611,7 +611,7 @@ static void show_patch_diff(struct combine_diff_path *elem, int num_parent,
struct sline *sline; /* survived lines */
int mode_differs = 0;
int i, show_hunks;
- int working_tree_file = !memcmp(elem->sha1, null_sha1, 20);
+ int working_tree_file = is_null_sha1(elem->sha1);
int abbrev = opt->full_index ? 40 : DEFAULT_ABBREV;
mmfile_t result_file;