summaryrefslogtreecommitdiff
path: root/diffcore.h
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2020-04-07 22:11:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-04-07 23:09:29 (GMT)
commit1c37e86ab2834dfca311799e799568794bc474ce (patch)
tree591e447109aed7b2dc9d6cee2e7826c04de70803 /diffcore.h
parentdb7ed7418b3702ab2b2df755764c3f452917a890 (diff)
downloadgit-1c37e86ab2834dfca311799e799568794bc474ce.zip
git-1c37e86ab2834dfca311799e799568794bc474ce.tar.gz
git-1c37e86ab2834dfca311799e799568794bc474ce.tar.bz2
diff: make diff_populate_filespec_options struct
The behavior of diff_populate_filespec() currently can be customized through a bitflag, but a subsequent patch requires it to support a non-boolean option. Replace the bitflag with an options struct. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diffcore.h')
-rw-r--r--diffcore.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/diffcore.h b/diffcore.h
index 7c07347..3b2020c 100644
--- a/diffcore.h
+++ b/diffcore.h
@@ -65,9 +65,12 @@ void free_filespec(struct diff_filespec *);
void fill_filespec(struct diff_filespec *, const struct object_id *,
int, unsigned short);
-#define CHECK_SIZE_ONLY 1
-#define CHECK_BINARY 2
-int diff_populate_filespec(struct repository *, struct diff_filespec *, unsigned int);
+struct diff_populate_filespec_options {
+ unsigned check_size_only : 1;
+ unsigned check_binary : 1;
+};
+int diff_populate_filespec(struct repository *, struct diff_filespec *,
+ const struct diff_populate_filespec_options *);
void diff_free_filespec_data(struct diff_filespec *);
void diff_free_filespec_blob(struct diff_filespec *);
int diff_filespec_is_binary(struct repository *, struct diff_filespec *);