* [PATCH] t1091: cone mode list deduplicates and normalizes paths
@ 2026-01-19 16:57 Pushkar Singh
2026-01-19 18:11 ` Derrick Stolee
0 siblings, 1 reply; 2+ messages in thread
From: Pushkar Singh @ 2026-01-19 16:57 UTC (permalink / raw)
To: git; +Cc: Pushkar Singh
Ensure that git sparse-checkout list in cone mode collapses
semantically identical paths (e.g. "folder1", "folder1/",
and "./folder1") into a single canonical entry.
This protects user-visible behavior across different ways
of specifying sparse-checkout patterns.
Signed-off-by: Pushkar Singh <pushkarkumarsingh1970@gmail.com>
---
t/t1091-sparse-checkout-builtin.sh | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/t/t1091-sparse-checkout-builtin.sh b/t/t1091-sparse-checkout-builtin.sh
index b2da4feaef..d4ed215aa5 100755
--- a/t/t1091-sparse-checkout-builtin.sh
+++ b/t/t1091-sparse-checkout-builtin.sh
@@ -321,6 +321,21 @@ test_expect_success 'cone mode: list' '
test_cmp expect actual
'
+test_expect_success 'cone mode: list deduplicates and normalizes paths' '
+ git -C repo sparse-checkout disable &&
+ rm -f repo/.git/info/sparse-checkout &&
+ git -C repo sparse-checkout init --cone &&
+
+ printf "folder1\nfolder1/\n./folder1\n" |
+ git -C repo sparse-checkout set --stdin &&
+
+ git -C repo sparse-checkout list >actual &&
+ cat >expect <<-\EOF &&
+ folder1
+ EOF
+ test_cmp expect actual
+'
+
test_expect_success 'cone mode: set with nested folders' '
git -C repo sparse-checkout set deep deep/deeper1/deepest 2>err &&
test_line_count = 0 err &&
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] t1091: cone mode list deduplicates and normalizes paths
2026-01-19 16:57 [PATCH] t1091: cone mode list deduplicates and normalizes paths Pushkar Singh
@ 2026-01-19 18:11 ` Derrick Stolee
0 siblings, 0 replies; 2+ messages in thread
From: Derrick Stolee @ 2026-01-19 18:11 UTC (permalink / raw)
To: Pushkar Singh, git
On 1/19/2026 11:57 AM, Pushkar Singh wrote:
> Ensure that git sparse-checkout list in cone mode collapses
> semantically identical paths (e.g. "folder1", "folder1/",
> and "./folder1") into a single canonical entry.
Are you aware that this is already being worked on? [1]
[1] https://lore.kernel.org/git/20260119123339.48435-1-amishhhaaaa@gmail.com/
Please contribute review to that thread with the context
you've gathered creating this patch.
Thanks,
-Stolee
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-19 18:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-19 16:57 [PATCH] t1091: cone mode list deduplicates and normalizes paths Pushkar Singh
2026-01-19 18:11 ` Derrick Stolee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox