summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2024-02-09 21:36:40 +0100
committerJunio C Hamano <gitster@pobox.com>2024-02-09 14:03:15 -0800
commitf51d790b67255dd40b55654527fc4f59a53f44b0 (patch)
tree504536b1d37bf3ffe619a13d9340dc813fa854e3 /commit.c
parent3526e67d917bcd03f317a058208fa02737654637 (diff)
receive-pack: use find_commit_header() in check_cert_push_options()
Use the public function find_commit_header() instead of find_header() to simplify the code. This is possible and safe because we're operating on a strbuf, which is always NUL-terminated, so there is no risk of running over the end of the buffer. It cannot contain NUL within the buffer, as it is built using strbuf_addstr(), only. The string comparison becomes more complicated because we need to check for NUL explicitly after comparing the length-limited option, but on the flip side we don't need to clean up allocations or track the remaining buffer length. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions