remote: drop checks for zero-url case

Now that the previous commit removed the possibility that a "struct
remote" will ever have zero url fields, we can drop a number of
redundant checks and untriggerable code paths.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King
2024-06-14 06:42:03 -04:00
committed by Junio C Hamano
parent ffce821880
commit aecd794fca
6 changed files with 12 additions and 37 deletions

View File

@ -109,8 +109,6 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
die("bad repository '%s'", dest);
die("No remote configured to list refs from.");
}
if (!remote->url.nr)
die("remote %s has no configured URL", dest);
if (get_url) {
printf("%s\n", remote->url.v[0]);