branch.c: if remote is not config'd for branch, don't try delete push config
If a remote is not configured for the branch configuration being deleted,
then don't try to delete the remote.<remote>.push configuration for the
branch. When the remote is not configured, branch->remote_name is not
filled in. When this NULL branch->remote_name is passed to strbuf_addf()
it will result in an attempt to remove a bogus configuration statement in
the best case (i.e. "remote.(null).push" for platforms which guard against
supplying NULL to a %s conversion spec) and a segfault in the worst case.
So check whether branch->remote_name is non-NULL before trying to use it.
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>