Skip to content

Commit d4e241a

Browse files
peffgitster
authored andcommitted
test-bundle-uri: drop unused variables
Commit 70b9c10 (bundle-uri client: add helper for testing server, 2022-12-22) added a cmd_ls_remote() function which contains "uploadpack" and "server_options" variables. Neither of these variables is ever modified after being initialized, so the code to handle non-NULL and non-empty values is impossible to reach. While in theory we might add command-line parsing to set these, let's drop the dead code for now in the name of cleanliness. It's easy enough to add it back later if need be. Noticed by Coverity. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 876094a commit d4e241a

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

t/helper/test-bundle-uri.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ static int cmd__bundle_uri_parse(int argc, const char **argv, enum input_mode mo
7676

7777
static int cmd_ls_remote(int argc, const char **argv)
7878
{
79-
const char *uploadpack = NULL;
80-
struct string_list server_options = STRING_LIST_INIT_DUP;
8179
const char *dest;
8280
struct remote *remote;
8381
struct transport *transport;
@@ -95,11 +93,6 @@ static int cmd_ls_remote(int argc, const char **argv)
9593
die(_("remote '%s' has no configured URL"), dest);
9694

9795
transport = transport_get(remote, NULL);
98-
if (uploadpack)
99-
transport_set_option(transport, TRANS_OPT_UPLOADPACK, uploadpack);
100-
if (server_options.nr)
101-
transport->server_options = &server_options;
102-
10396
if (transport_get_remote_bundle_uri(transport) < 0) {
10497
error(_("could not get the bundle-uri list"));
10598
status = 1;

0 commit comments

Comments
 (0)