Skip to content

Commit

Permalink
string-list API users: change confused remote.c user
Browse files Browse the repository at this point in the history
Change a user of the string-list API in builtin/remote.c which
initialized with STRING_LIST_INIT_NODUP, and then right away did the
equivalent of having initialized with STRING_LIST_INIT_DUP by setting
the "strdup_strings" member to "1".

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
  • Loading branch information
avar committed Oct 19, 2021
1 parent 6c6b9e2 commit bdf4466
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions builtin/remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -1189,10 +1189,9 @@ static int get_one_entry(struct remote *remote, void *priv)

static int show_all(void)
{
struct string_list list = STRING_LIST_INIT_NODUP;
struct string_list list = STRING_LIST_INIT_DUP;
int result;

list.strdup_strings = 1;
result = for_each_remote(get_one_entry, &list);

if (!result) {
Expand Down

0 comments on commit bdf4466

Please sign in to comment.