summaryrefslogtreecommitdiff
path: root/diffcore.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-07-06 07:18:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-07-06 07:21:41 (GMT)
commit29a3eefde111f6a24292163c4308f00ab3572627 (patch)
treee074c7fd73a777c45cd8d95a27a1dcc879532ceb /diffcore.h
parent46f74f007b86452c4b4135f5145f94eefc994ea2 (diff)
downloadgit-29a3eefde111f6a24292163c4308f00ab3572627.zip
git-29a3eefde111f6a24292163c4308f00ab3572627.tar.gz
git-29a3eefde111f6a24292163c4308f00ab3572627.tar.bz2
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.h')
-rw-r--r--diffcore.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/diffcore.h b/diffcore.h
index 0c8abb5..dcab7e2 100644
--- a/diffcore.h
+++ b/diffcore.h
@@ -37,6 +37,7 @@ struct diff_filespec {
#define DIFF_FILE_VALID(spec) (((spec)->mode) != 0)
unsigned should_free : 1; /* data should be free()'ed */
unsigned should_munmap : 1; /* data should be munmap()'ed */
+ unsigned checked_attr : 1;
unsigned is_binary : 1; /* data should be considered "binary" */
};
@@ -46,6 +47,7 @@ extern void fill_filespec(struct diff_filespec *, const unsigned char *,
extern int diff_populate_filespec(struct diff_filespec *, int);
extern void diff_free_filespec_data(struct diff_filespec *);
+extern int diff_filespec_is_binary(struct diff_filespec *);
struct diff_filepair {
struct diff_filespec *one;