diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-12-27 11:46:28 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-12-27 17:12:40 +0100 |
commit | 455ac07021d4feede4f5b7e39bf00dc186ce3c09 (patch) | |
tree | 95b517937653d59d67bde1dae114ceec50854515 /shallow.h | |
parent | builtin/log: fix remaining -Wsign-compare warnings (diff) | |
download | git-455ac07021d4feede4f5b7e39bf00dc186ce3c09.tar.xz git-455ac07021d4feede4f5b7e39bf00dc186ce3c09.zip |
shallow: fix -Wsign-compare warnings
Fix a couple of -Wsign-compare issues in "shallow.c" and mark the file
as -Wsign-compare-clean. This change prepares the code for a refactoring
of `repo_in_merge_bases_many()`, which will be adapted to accept the
number of commits as `size_t` instead of `int`.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'shallow.h')
-rw-r--r-- | shallow.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -59,8 +59,8 @@ void prune_shallow(unsigned options); */ struct shallow_info { struct oid_array *shallow; - int *ours, nr_ours; - int *theirs, nr_theirs; + size_t *ours, nr_ours; + size_t *theirs, nr_theirs; struct oid_array *ref; /* for receive-pack */ @@ -69,7 +69,7 @@ struct shallow_info { int *reachable; int *shallow_ref; struct commit **commits; - int nr_commits; + size_t nr_commits; }; void prepare_shallow_info(struct shallow_info *, struct oid_array *); |