Re: [PATCH v3 1/2] sparse-checkout: use string_list_sort_u
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 22, 2026, 02:44 UTC
- Message-ID
- <xmqq8qclsdjd.fsf@gitster.g>
- In-Reply-To
- <20260221162359.43336-1-amishhhaaaa@gmail.com>
Amisha Chhajed <amishhhaaaa@gmail.com> writes:
Show 11 quoted lines
> From: Amisha Chhajed <136238836+amishhaa@users.noreply.github.com> > > sparse_checkout_list() uses string_list_sort and > string_list_remove_duplicates instead of string_list_sort_u. > > use string_list_sort_u at that place. > > Signed-off-by: Amisha Chhajed <136238836+amishhaa@users.noreply.github.com> > --- > builtin/sparse-checkout.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-)
An exact copy of this patch is already in 'next' since Feb 17th, if I am not mistaken.
Show 14 quoted lines
> diff --git a/builtin/sparse-checkout.c b/builtin/sparse-checkout.c
> index cccf630331..34e965bfa6 100644
> --- a/builtin/sparse-checkout.c
> +++ b/builtin/sparse-checkout.c
> @@ -94,8 +94,7 @@ static int sparse_checkout_list(int argc, const char **argv, const char *prefix,
> string_list_append(&sl, pe->pattern + 1);
> }
>
> - string_list_sort(&sl);
> - string_list_remove_duplicates(&sl, 0);
> + string_list_sort_u(&sl, 0);
>
> for (i = 0; i < sl.nr; i++) {
> quote_c_style(sl.items[i].string, NULL, stdout, 0);