remote: clean-up config callback
authorBert Wesarg <bert.wesarg@googlemail.com>
Mon, 27 Jan 2020 07:04:29 +0000 (08:04 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Feb 2020 18:52:10 +0000 (10:52 -0800)
commitceff1a13084bba74b607d738c6c467365aa6a5f7
tree690b7de335addfaa9abe888f63b97a6f271d9ea0
parent1a83068c26206d2b45718e0896955eb61bef8353
remote: clean-up config callback

Some minor clean-ups in function `config_read_branches`:

 * remove hardcoded length in `key += 7`
 * call `xmemdupz` only once
 * use a switch to handle the configuration type and add a `BUG()`

Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/remote.c