read-cache.c: replace `git_config()` with `git_config_get_*()` family
read-cache.c: replace `git_config()` with `git_config_get_*()` family

Use `git_config_get_*()` family instead of `git_config()` to take
advantage of the config-set API which provides a cleaner control flow.

Use an intermediate value, as `version` can not be used directly in
git_config_get_int() due to incompatible type.

Signed-off-by: Tanay Abhra <43a0dd602247961f0b6e66a197d8f2daec3be19d@gmail.com>
Reviewed-by: Matthieu Moy <d4d2cc2a6ec7b2aa587d4887cc5ed200f9b685a1@imag.fr>
Signed-off-by: Junio C Hamano <a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com>

destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git