diff options
| author | Jeff King <peff@peff.net> | 2024-06-14 06:28:01 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-06-14 09:34:38 -0700 |
| commit | 8e804415fd3183f56ced0dcc168f8cb4aa790473 (patch) | |
| tree | d5a44014ca781a900782abe13218f3bfec2440ed /t/helper/test-bundle-uri.c | |
| parent | 52595c155a66076020a42197c10a32086d7c4ada (diff) | |
| download | git-8e804415fd3183f56ced0dcc168f8cb4aa790473.tar.gz | |
remote: use strvecs to store remote url/pushurl
Now that the url/pushurl fields of "struct remote" own their strings, we
can switch from bare arrays to strvecs. This has a few advantages:
- push/clear are now one-liners
- likewise the free+assigns in alias_all_urls() can use
strvec_replace()
- we now use size_t for storage, avoiding possible overflow
- this will enable some further cleanups in future patches
There's quite a bit of fallout in the code that reads these fields, as
it tends to access these arrays directly. But it's mostly a mechanical
replacement of "url_nr" with "url.nr", and "url[i]" with "url.v[i]",
with a few variations (e.g. "*url" could become "*url.v", but I used
"url.v[0]" for consistency).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper/test-bundle-uri.c')
| -rw-r--r-- | t/helper/test-bundle-uri.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/helper/test-bundle-uri.c b/t/helper/test-bundle-uri.c index 09dc78733c..3285dd962e 100644 --- a/t/helper/test-bundle-uri.c +++ b/t/helper/test-bundle-uri.c @@ -88,7 +88,7 @@ static int cmd_ls_remote(int argc, const char **argv) die(_("bad repository '%s'"), dest); die(_("no remote configured to get bundle URIs from")); } - if (!remote->url_nr) + if (!remote->url.nr) die(_("remote '%s' has no configured URL"), dest); transport = transport_get(remote, NULL); |
