From: Jeff King Date: Wed, 23 Jan 2013 06:23:05 +0000 (-0500) Subject: config: add helper function for parsing key names X-Git-Tag: v1.8.2-rc0~61^2~7 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/1b86bbb0ade4641c2da0dc74ebca1c09ec772bb4?hp=1b86bbb0ade4641c2da0dc74ebca1c09ec772bb4 config: add helper function for parsing key names The config callback functions get keys of the general form: section.subsection.key (where the subsection may be contain arbitrary data, or may be missing). For matching keys without subsections, it is simple enough to call "strcmp". Matching keys with subsections is a little more complicated, and each callback does it in an ad-hoc way, usually involving error-prone pointer arithmetic. Let's provide a helper that keeps the pointer arithmetic all in one place. Signed-off-by: Jeff King Reviewed-by: Jonathan Nieder Signed-off-by: Junio C Hamano ---