From: "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail•com>
To: "Amisha Chhajed" <amishhhaaaa@gmail•com>
Cc: "Junio C Hamano" <gitster@pobox•com>,
"Derrick Stolee" <stolee@gmail•com>,
"Elijah Newren" <newren@gmail•com>, "Jeff King" <peff@peff•net>,
git@vger•kernel.org
Subject: Re: [PATCH 2/2] string-list: add string_list_sort_u() that mimics "sort -u"
Date: Fri, 30 Jan 2026 20:51:21 +0100 [thread overview]
Message-ID: <e01f307c-3d7e-41b2-b62a-f61b1dd17640@app.fastmail.com> (raw)
In-Reply-To: <20260125201500.63904-2-amishhhaaaa@gmail.com>
On Sun, Jan 25, 2026, at 21:15, Amisha Chhajed wrote:
> Many callsites of string_list_remove_duplicates() call it
> immdediately after calling string_list_sort(), understandably
nit: s/immdediately/immediately
> as the former requires string-list to be sorted, it is clear
> that these places are sorting only to remove duplicates and
> for no other reason.
>
> Introduce a helper function string_list_sort_u that combines
> these two calls that often appear together, to simplify
> these callsites. Replace the current calls of those methods with
> string_list_sort_u().
>
> Signed-off-by: Amisha Chhajed <amishhhaaaa@gmail•com>
> ---
>[snip]
next prev parent reply other threads:[~2026-01-30 19:51 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-22 17:15 [RFC PATCH 0/2] Adding string_list_sort_u to replace combined calls of string_list_sort and string_list_remove_duplicates calls Amisha Chhajed
2026-01-22 17:15 ` [RFC PATCH 1/2] Adding string_list_sort_u which sorts a list then deduplicates it Amisha Chhajed
2026-01-22 22:07 ` Junio C Hamano
2026-01-25 20:23 ` Amisha Chhajed
2026-01-22 17:15 ` [RFC PATCH 2/2] Replacing calls of string_list_sort and string_list_remove_duplicates with the combined variant string_list_u Amisha Chhajed
2026-01-22 22:19 ` Junio C Hamano
2026-01-22 22:09 ` [RFC PATCH 0/2] Adding string_list_sort_u to replace combined calls of string_list_sort and string_list_remove_duplicates calls Junio C Hamano
2026-01-25 20:14 ` [PATCH 1/2] u-string-list: add unit tests for string-list methods Amisha Chhajed
2026-01-25 20:15 ` [PATCH 2/2] string-list: add string_list_sort_u() that mimics "sort -u" Amisha Chhajed
2026-01-29 12:12 ` [PATCH v3 1/2] u-string-list: add unit tests for string-list methods Amisha Chhajed
2026-01-29 12:12 ` [PATCH v3 2/2] string-list: add string_list_sort_u() that mimics "sort -u" Amisha Chhajed
2026-01-29 12:14 ` [PATCH v3 1/2] u-string-list: add unit tests for string-list methods Amisha Chhajed
2026-01-30 19:51 ` Kristoffer Haugsbakk [this message]
2026-01-30 21:45 ` [PATCH 2/2] string-list: add string_list_sort_u() that mimics "sort -u" Junio C Hamano
2026-01-26 7:12 ` [PATCH 1/2] u-string-list: add unit tests for string-list methods Junio C Hamano
2026-01-26 18:57 ` Amisha Chhajed
2026-01-26 19:12 ` Junio C Hamano
2026-01-25 20:17 ` Amisha Chhajed
2026-01-25 20:17 ` [PATCH 2/2] string-list: add string_list_sort_u() that mimics "sort -u" Amisha Chhajed
2026-01-26 18:56 ` [PATCH v2 1/2] u-string-list: add unit tests for string-list methods Amisha Chhajed
2026-01-26 18:56 ` [PATCH v2 2/2] string-list: add string_list_sort_u() that mimics "sort -u" Amisha Chhajed
2026-01-26 20:11 ` Junio C Hamano
2026-01-27 1:27 ` Amisha Chhajed
2026-01-26 19:50 ` [PATCH v2 1/2] u-string-list: add unit tests for string-list methods Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e01f307c-3d7e-41b2-b62a-f61b1dd17640@app.fastmail.com \
--to=kristofferhaugsbakk@fastmail$(echo .)com \
--cc=amishhhaaaa@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
--cc=newren@gmail$(echo .)com \
--cc=peff@peff$(echo .)net \
--cc=stolee@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox