diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2020-04-08 00:11:41 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-04-08 01:09:29 +0200 |
commit | 1c37e86ab2834dfca311799e799568794bc474ce (patch) | |
tree | 591e447109aed7b2dc9d6cee2e7826c04de70803 /line-log.c | |
parent | promisor-remote: accept 0 as oid_nr in function (diff) | |
download | git-1c37e86ab2834dfca311799e799568794bc474ce.tar.xz git-1c37e86ab2834dfca311799e799568794bc474ce.zip |
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 'line-log.c')
-rw-r--r-- | line-log.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/line-log.c b/line-log.c index 9010e00950..40e1738dbb 100644 --- a/line-log.c +++ b/line-log.c @@ -519,7 +519,7 @@ static void fill_line_ends(struct repository *r, unsigned long *ends = NULL; char *data = NULL; - if (diff_populate_filespec(r, spec, 0)) + if (diff_populate_filespec(r, spec, NULL)) die("Cannot read blob %s", oid_to_hex(&spec->oid)); ALLOC_ARRAY(ends, size); @@ -1045,12 +1045,12 @@ static int process_diff_filepair(struct rev_info *rev, return 0; assert(pair->two->oid_valid); - diff_populate_filespec(rev->diffopt.repo, pair->two, 0); + diff_populate_filespec(rev->diffopt.repo, pair->two, NULL); file_target.ptr = pair->two->data; file_target.size = pair->two->size; if (pair->one->oid_valid) { - diff_populate_filespec(rev->diffopt.repo, pair->one, 0); + diff_populate_filespec(rev->diffopt.repo, pair->one, NULL); file_parent.ptr = pair->one->data; file_parent.size = pair->one->size; } else { |