diff options
author | John Cai <johncai86@gmail.com> | 2022-01-06 20:07:35 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-01-06 13:17:20 -0800 |
commit | cfc5cf428bcc8ff31748bba97baee31f529a30ea (patch) | |
tree | 46198b3f3106a8bc3e631bb3da928341df7b259b /prune-packed.h | |
parent | The fifth batch (diff) | |
download | tgif-cfc5cf428bcc8ff31748bba97baee31f529a30ea.tar.xz |
receive-pack.c: consolidate find header logic
There are two functions that have very similar logic of finding a header
value. find_commit_header, and find_header. We can conslidate the logic
by introducing a new function find_header_mem, which is equivalent to
find_commit_header except it takes a len parameter that determines how
many bytes will be read. find_commit_header and find_header can then both
call find_header_mem.
This reduces duplicate logic, as the logic for finding header values
can now all live in one place.
Signed-off-by: John Cai <johncai86@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'prune-packed.h')
0 files changed, 0 insertions, 0 deletions