remote.c: reject 0-length branch names
commitf1dfbd9ee010e5cdf0d931d16b4b2892b33331e5
authorGlen Choo <chooglen@google.com>
Tue, 31 May 2022 23:12:34 +0000 (31 23:12 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 1 Jun 2022 17:49:51 +0000 (1 10:49 -0700)
tree11059c68a3ec4fe9dd62bb52bcdef264b9fb2fc4
parent91e2e8f63ebd92295ff0eb5f4095f9e1fba8bab0
remote.c: reject 0-length branch names

Branch names can't be empty, so config keys with an empty branch name,
e.g. "branch..remote", are silently ignored.

Since these config keys will never be useful, make it a fatal error when
remote.c finds a key that starts with "branch." and has an empty
subsection.

Signed-off-by: Glen Choo <chooglen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote.c
t/t5516-fetch-push.sh