{"thread":{"id":"58156","subject":"\"reject arguments in cone-mode that look like patterns\" doesn't work in macos-12","startedAt":"2022-07-14T08:01:55Z","lastAt":"2022-07-14T20:06:12Z","messageCount":4,"participants":["fawaz ahmed0","Victoria Dye"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"459033","messageId":"BL0PR13MB427533B25CCFE6A37F7619E8F1889@BL0PR13MB4275.namprd13.prod.outlook.com","threadId":"58156","inReplyTo":"BL0PR13MB42750BC5C4837B7B0BD1885EF1889@BL0PR13MB4275.namprd13.prod.outlook.com","subject":"\"reject arguments in cone-mode that look like patterns\" doesn't work in macos-12","fromName":"fawaz ahmed0","fromEmail":"fawazahmed0@hotmail.com","sentAt":"2022-07-14T08:00:57Z","receivedAt":"2022-07-14T08:01:55Z","isPatch":false,"sender":{"key":"fawazahmed0@hotmail.com","avatar":null},"body":"Please refer: https://github.com/git/git/commit/8dd7c4739bded62175bea1f7518d993b39b51f90#commitcomment-78433458\n\n\nUsing patterns in cone mode should fail, but it doesn't seem to fail on macOS-12(github actions)\n\nStep to reproduce(try in macOS-12):\n\ngit clone --filter=blob:none --no-checkout --depth 1 --sparse https://github.com/fawazahmed0/currency-api.git . \ngit sparse-checkout add 'latest/*'\n\nThanks\nFawaz Ahmed"},{"id":"459067","messageId":"4f4d5d03-2a0d-19c1-fd2e-80ab86aa1145@github.com","threadId":"58156","inReplyTo":"BL0PR13MB427533B25CCFE6A37F7619E8F1889@BL0PR13MB4275.namprd13.prod.outlook.com","subject":"Re: \"reject arguments in cone-mode that look like patterns\" doesn't work in macos-12","fromName":"Victoria Dye","fromEmail":"vdye@github.com","sentAt":"2022-07-14T19:18:51Z","receivedAt":"2022-07-14T19:19:02Z","isPatch":false,"sender":{"key":"vdye@github.com","avatar":"https://avatars.githubusercontent.com/u/3619353?v=4"},"body":"fawaz ahmed0 wrote:\n> Please refer: https://github.com/git/git/commit/8dd7c4739bded62175bea1f7518d993b39b51f90#commitcomment-78433458\n> \n> \n> Using patterns in cone mode should fail, but it doesn't seem to fail on macOS-12(github actions)\n\nCan you confirm which version is being used on that MacOS agent? For\nexample, you could add a call to 'git version' in the workflow and see what\nit prints out. I suspect that the agent may be using an older version of\nGit, which would mean that the sparse-checkout is initialized in *non* cone\nmode.\n\nFor what it's worth, my local development machine is also MacOS 12 (running\nGit v2.37), and I'm correctly seeing the error in a cone mode\nsparse-checkout.\n\n> \n> Step to reproduce(try in macOS-12):\n> \n> git clone --filter=blob:none --no-checkout --depth 1 --sparse https://github.com/fawazahmed0/currency-api.git . \n> git sparse-checkout add 'latest/*'\n> \n> Thanks\n> Fawaz Ahmed\n\n"},{"id":"459081","messageId":"a1580785-e35c-9a2d-7fa1-c3d7fc62883b@github.com","threadId":"58156","inReplyTo":"BL0PR13MB427538CEAD5481CCBF6D195DF1889@BL0PR13MB4275.namprd13.prod.outlook.com","subject":"Re: \"reject arguments in cone-mode that look like patterns\" doesn't work in macos-12","fromName":"Victoria Dye","fromEmail":"vdye@github.com","sentAt":"2022-07-14T19:47:34Z","receivedAt":"2022-07-14T19:47:38Z","isPatch":false,"sender":{"key":"vdye@github.com","avatar":"https://avatars.githubusercontent.com/u/3619353?v=4"},"body":"fawaz ahmed0 wrote:\n\nHi Fawaz,\n\nPlease make sure you \"Reply-all\" to include the mailing list in the\ndiscussion, and make sure to inline or bottom-post your replies.\n\n> I assume it's v2.37, you can reproduce it on github actions macos 12.\n\nPer the virtual environment specification [1] linked in the runner execution\n[2], the Git version used on these agents is 2.36.1. \n\n[1] https://github.com/actions/virtual-environments/blob/macOS-12/20220627.3/images/macos/macos-12-Readme.md\n[2] https://github.com/fawazahmed0/currency-api/runs/7312663698?check_suite_focus=true#step:1:11\n\n> \n> My github actions workflow didn't fail, even when I was setting pattern in cone mode.\n> \n> please see: https://github.com/fawazahmed0/currency-api/actions/runs/2660320076/workflow#L31\n\nBased on the commands you linked, combined with the fact that cone mode was\nnot made the default until v2.37, you're setting a wildcard pattern in *non*\ncone mode. If you want to use cone mode in version v2.36, try running 'git\nsparse-checkout reapply --cone' after your clone to set the appropriate\nconfig.\n\n> \n> \n> \n> \n> From: Victoria Dye <vdye@github.com>\n> Sent: Friday, July 15, 2022 12:48 AM\n> To: fawaz ahmed0 <fawazahmed0@hotmail.com>; git@vger.kernel.org <git@vger.kernel.org>\n> Subject: Re: \"reject arguments in cone-mode that look like patterns\" doesn't work in macos-12 \n>  \n> fawaz ahmed0 wrote:\n>> Please refer: https://github.com/git/git/commit/8dd7c4739bded62175bea1f7518d993b39b51f90#commitcomment-78433458\n>>\n>>\n>> Using patterns in cone mode should fail, but it doesn't seem to fail on macOS-12(github actions)\n> \n> Can you confirm which version is being used on that MacOS agent? For\n> example, you could add a call to 'git version' in the workflow and see what\n> it prints out. I suspect that the agent may be using an older version of\n> Git, which would mean that the sparse-checkout is initialized in *non* cone\n> mode.\n> \n> For what it's worth, my local development machine is also MacOS 12 (running\n> Git v2.37), and I'm correctly seeing the error in a cone mode\n> sparse-checkout.\n> \n>>\n>> Step to reproduce(try in macOS-12):\n>>\n>> git clone --filter=blob:none --no-checkout --depth 1 --sparse https://github.com/fawazahmed0/currency-api.git . \n>> git sparse-checkout add 'latest/*'\n>>\n>> Thanks\n>> Fawaz Ahmed\n\n"},{"id":"459082","messageId":"BL0PR13MB42753E6FEFE67713F0EB0895F1889@BL0PR13MB4275.namprd13.prod.outlook.com","threadId":"58156","inReplyTo":"a1580785-e35c-9a2d-7fa1-c3d7fc62883b@github.com","subject":"Re: \"reject arguments in cone-mode that look like patterns\" doesn't work in macos-12","fromName":"fawaz ahmed0","fromEmail":"fawazahmed0@hotmail.com","sentAt":"2022-07-14T20:05:46Z","receivedAt":"2022-07-14T20:06:12Z","isPatch":false,"sender":{"key":"fawazahmed0@hotmail.com","avatar":null},"body":"\n\n> Per the virtual environment specification [1] linked in the runner execution\n> [2], the Git version used on these agents is 2.36.1. \n\n> [1] https://github.com/actions/virtual-environments/blob/macOS-12/20220627.3/images/macos/macos-12-Readme.md\n> [2] https://github.com/fawazahmed0/currency-api/runs/7312663698?check_suite_focus=true#step:1:11\n\nSorry, I didn't know that every runner has it's own specification, I was actually referring the updated page:\nhttps://github.com/actions/virtual-environments/blob/main/images/macos/macos-12-Readme.md#:~:text=7.84.0-,git%202.37.0,-Git%20LFS%3A%203 \n\nMaybe I should have manually checked the git version in runner, before filing this bug. \nThank you for looking into this."}]}