apply: remove prefix_length member from apply_state
commit881529c84656e7ff41379c0684df0ff9a796d444
authorRené Scharfe <l.s.r@web.de>
Wed, 9 Aug 2017 15:54:46 +0000 (9 17:54 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 9 Aug 2017 17:21:45 +0000 (9 10:21 -0700)
treedfcb91dad1a4d2e1b918c83bcd02f4f76b46223b
parent95d67879735cfecfdd85f89e59d993c5b4de8835
apply: remove prefix_length member from apply_state

Use a NULL-and-NUL check to see if we have a prefix and consistently use
C string functions on it instead of storing its length in a member of
struct apply_state.  This avoids strlen() calls and simplifies the code.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
apply.c
apply.h