diff options
| author | Denton Liu <liu.denton@gmail.com> | 2021-01-06 01:01:53 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2021-01-10 12:24:00 -0800 |
| commit | 95c2a71820c8fc2bd333921dee71c35871923716 (patch) | |
| tree | 92e2161980ec3102dcb3ad2943f7d65393498521 /commit.c | |
| parent | Git 2.30 (diff) | |
| download | git-95c2a71820c8fc2bd333921dee71c35871923716.tar.gz git-95c2a71820c8fc2bd333921dee71c35871923716.zip | |
refs: factor out set_read_ref_cutoffs()
This block of code is duplicated twice. In a future commit, it will be
duplicated for a third time. Factor out the common functionality into
set_read_ref_cutoffs().
In the case of read_ref_at_ent(), we are incrementing `cb->reccnt` at the
beginning of the function. Move these to right before the return so that
the `cb->reccnt - 1` is changed to `cb->reccnt` and it can be cleanly
factored out into set_read_ref_cutoffs(). The duplication of the
increment statements will be removed in a future patch.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions
