summary refs log tree commit diff
path: root/diffcore-delta.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-07-06 00:18:54 -0700
committerJunio C Hamano <gitster@pobox.com>2007-07-06 00:21:41 -0700
commit29a3eefde111f6a24292163c4308f00ab3572627 (patch)
treee074c7fd73a777c45cd8d95a27a1dcc879532ceb /diffcore-delta.c
parent46f74f007b86452c4b4135f5145f94eefc994ea2 (diff)
Introduce diff_filespec_is_binary()
This replaces an explicit initialization of filespec->is_binary
field used for rename/break followed by direct access to that
field with a wrapper function that lazily iniaitlizes and
accesses the field.  We would add more attribute accesses for
the use of diff routines, and it would be better to make this
abstraction earlier.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diffcore-delta.c')
-rw-r--r--diffcore-delta.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/diffcore-delta.c b/diffcore-delta.c
index a038b166c5..d9729e5ec2 100644
--- a/diffcore-delta.c
+++ b/diffcore-delta.c
@@ -129,7 +129,7 @@ static struct spanhash_top *hash_chars(struct diff_filespec *one)
 	struct spanhash_top *hash;
 	unsigned char *buf = one->data;
 	unsigned int sz = one->size;
-	int is_text = !one->is_binary;
+	int is_text = !diff_filespec_is_binary(one);
 
 	i = INITIAL_HASH_SIZE;
 	hash = xmalloc(sizeof(*hash) + sizeof(struct spanhash) * (1<<i));