summaryrefslogtreecommitdiff
path: root/merge-blobs.c
diff options
context:
space:
mode:
authorLibravatar John Cai <johncai86@gmail.com>2022-01-06 20:07:35 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2022-01-06 13:17:20 -0800
commitcfc5cf428bcc8ff31748bba97baee31f529a30ea (patch)
tree46198b3f3106a8bc3e631bb3da928341df7b259b /merge-blobs.c
parentThe fifth batch (diff)
downloadtgif-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 'merge-blobs.c')
0 files changed, 0 insertions, 0 deletions