Re: [PATCH 4/9] sparse-checkout: 'add' subcommand
From: Derrick Stolee <hidden>
Date: 2019-09-18 17:23:53
On 9/18/2019 10:56 AM, Elijah Newren wrote:
On Wed, Sep 18, 2019 at 6:55 AM Derrick Stolee [off-list ref] wrote:quoted
On 8/23/2019 7:30 PM, Elijah Newren wrote:quoted
On Tue, Aug 20, 2019 at 8:12 AM Derrick Stolee via GitGitGadget [off-list ref] wrote:quoted
...quoted
quoted
quoted
diff --git a/t/t1091-sparse-checkout-builtin.sh b/t/t1091-sparse-checkout-builtin.sh index b7d5f15830..499bd8d6d0 100755 --- a/t/t1091-sparse-checkout-builtin.sh +++ b/t/t1091-sparse-checkout-builtin.sh@@ -100,4 +100,24 @@ test_expect_success 'clone --sparse' ' test_cmp expect dir ' +test_expect_success 'add to existing sparse-checkout' ' + echo "/folder2/*" | git -C repo sparse-checkout add &&I've always been using '/folder2/' in sparse-checkout, without the trailing asterisk. That seems more friendly for cone mode too. Are there benefits to keeping the trailing asterisk?I think I've been seeing issues with pattern matching on Windows without the trailing asterisk. I'm currently double-checking to make sure this is important or not.Can you try with the en/clean-nested-with-ignored topic in pu to see if that fixes those issues?
Merging with that branch was very difficult. There is a lot of unshared history between our branches. Instead, I tried once more to dig into the strange issue on Windows, and it appears it is an issue with how the Git for Windows SDK modifies shell arguments with a "/". When I ran `git sparse-checkout set "/folder1/*"` it worked. When I run `git sparse-checkout set "/folder1/"`, the SDK completes that argument to "C:/git-sdk-64/folder1/" on my machine (something more complicated on the build machine). It's not actually a bug in the Git code, but something in the build and test environment. I can get around it by testing the builtin without using these cone-like patterns. When using `git sparse-checkout set folder1 folder2` in cone mode, Git does the right thing. Sorry for the noise here. -Stolee