diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-12-27 11:46:24 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-12-27 17:11:45 +0100 |
commit | 45843d8f4eb2bbfc73cc361ba9d612d088dc8a4f (patch) | |
tree | d1a6f5c1cbb3352ef9eef8e3d0a2607e4ba905fa /commit-reach.h | |
parent | commit-reach: fix type of `min_commit_date` (diff) | |
download | git-45843d8f4eb2bbfc73cc361ba9d612d088dc8a4f.tar.xz git-45843d8f4eb2bbfc73cc361ba9d612d088dc8a4f.zip |
commit-reach: use `size_t` to track indices in `remove_redundant()`
The function `remove_redundant()` gets as input an array of commits as
well as the size of that array and then drops redundant commits from
that array. It then returns either `-1` in case an error occurred, or
the new number of items in the array.
The function receives and returns these sizes with a signed integer,
which causes several warnings with -Wsign-compare. Fix this issue by
consistently using `size_t` to track array indices and splitting up
the returned value into a returned error code and a separate out pointer
for the new computed size.
Note that `get_merge_bases_many()` and related functions still track
array sizes as a signed integer. This will be fixed in a subsequent
commit.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-reach.h')
0 files changed, 0 insertions, 0 deletions