Re: [PATCH v3 4/4] completion: avoid user confusion in non-cone mode
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 3, 2023, 13:15 UTC
- Message-ID
- <xmqqv89f4eck.fsf@gitster.g>
- In-Reply-To
- <89501b366ff0476c1b3d36ff9b6b7c80fa6fc98f.1701583024.git.gitgitgadget@gmail.com>
"Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 12 quoted lines
> @@ -1581,7 +1581,12 @@ test_expect_success 'non-cone mode sparse-checkout uses bash completion' ' > # expected to be empty since we have not configured > # custom completion for non-cone mode > test_completion "git sparse-checkout set f" <<-\EOF > - > + /folder1/0/1/t.txt > + /folder1/expected > + /folder1/out > + /folder1/out_sorted > + /folder2/0/t.txt > + /folder3/t.txt > EOF
The "test_completion" helper strips "Z" at the end of its input lines so that a hunk like this can be written without having to worry about mail transport eating trailing whitespaces.
I'll squash the following while queuing.
Thanks.
t/t9902-completion.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index 5634b78fc5..aa9a614de3 100755 --- a/t/t9902-completion.sh +++ b/t/t9902-completion.sh @@ -1581,12 +1581,12 @@ test_expect_success 'non-cone mode sparse-checkout gives rooted paths' ' # expected to be empty since we have not configured # custom completion for non-cone mode test_completion "git sparse-checkout set f" <<-\EOF - /folder1/0/1/t.txt - /folder1/expected - /folder1/out - /folder1/out_sorted - /folder2/0/t.txt - /folder3/t.txt + /folder1/0/1/t.txt Z + /folder1/expected Z + /folder1/out Z + /folder1/out_sorted Z + /folder2/0/t.txt Z + /folder3/t.txt Z EOF ) '