submodule: use parse_config_key when parsing config
authorJeff King <redacted>
Wed, 23 Jan 2013 06:25:22 +0000 (01:25 -0500)
committerJunio C Hamano <redacted>
Wed, 23 Jan 2013 20:57:50 +0000 (12:57 -0800)
commit9edbb8b1c1fdb199b47650f50fc432b1bfcb9039
tree4c551f5dba34ddffe178616bf6487d789a8acdae
parent0a5987fe5e0cea23245e0beab6eb47131864b276
submodule: use parse_config_key when parsing config

This makes the code a lot simpler to read by dropping a
whole bunch of constant offsets.

As a bonus, it means we also feed the whole config variable
name to our error functions:

  [before]
  $ git -c submodule.foo.fetchrecursesubmodules=bogus checkout
  fatal: bad foo.fetchrecursesubmodules argument: bogus

  [after]
  $ git -c submodule.foo.fetchrecursesubmodules=bogus checkout
  fatal: bad submodule.foo.fetchrecursesubmodules argument: bogus

Signed-off-by: Jeff King <redacted>
Reviewed-by: Jonathan Nieder <redacted>
Acked-by: Jens Lehmann <redacted>
Signed-off-by: Junio C Hamano <redacted>
submodule.c
git clone https://git.99rst.org/PROJECT