git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* "reject arguments in cone-mode that look like patterns" doesn't work in macos-12
       [not found] <BL0PR13MB42750BC5C4837B7B0BD1885EF1889@BL0PR13MB4275.namprd13.prod.outlook.com>
@ 2022-07-14  8:00 ` fawaz ahmed0
  2022-07-14 19:18   ` Victoria Dye
  0 siblings, 1 reply; 4+ messages in thread
From: fawaz ahmed0 @ 2022-07-14  8:00 UTC (permalink / raw)
  To: git@vger.kernel.org

Please refer: https://github.com/git/git/commit/8dd7c4739bded62175bea1f7518d993b39b51f90#commitcomment-78433458


Using patterns in cone mode should fail, but it doesn't seem to fail on macOS-12(github actions)

Step to reproduce(try in macOS-12):

git clone --filter=blob:none --no-checkout --depth 1 --sparse https://github.com/fawazahmed0/currency-api.git . 
git sparse-checkout add 'latest/*'

Thanks
Fawaz Ahmed

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: "reject arguments in cone-mode that look like patterns" doesn't work in macos-12
  2022-07-14  8:00 ` "reject arguments in cone-mode that look like patterns" doesn't work in macos-12 fawaz ahmed0
@ 2022-07-14 19:18   ` Victoria Dye
       [not found]     ` <BL0PR13MB427538CEAD5481CCBF6D195DF1889@BL0PR13MB4275.namprd13.prod.outlook.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Victoria Dye @ 2022-07-14 19:18 UTC (permalink / raw)
  To: fawaz ahmed0, git@vger.kernel.org

fawaz ahmed0 wrote:
> Please refer: https://github.com/git/git/commit/8dd7c4739bded62175bea1f7518d993b39b51f90#commitcomment-78433458
> 
> 
> Using patterns in cone mode should fail, but it doesn't seem to fail on macOS-12(github actions)

Can you confirm which version is being used on that MacOS agent? For
example, you could add a call to 'git version' in the workflow and see what
it prints out. I suspect that the agent may be using an older version of
Git, which would mean that the sparse-checkout is initialized in *non* cone
mode.

For what it's worth, my local development machine is also MacOS 12 (running
Git v2.37), and I'm correctly seeing the error in a cone mode
sparse-checkout.

> 
> Step to reproduce(try in macOS-12):
> 
> git clone --filter=blob:none --no-checkout --depth 1 --sparse https://github.com/fawazahmed0/currency-api.git . 
> git sparse-checkout add 'latest/*'
> 
> Thanks
> Fawaz Ahmed


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: "reject arguments in cone-mode that look like patterns" doesn't work in macos-12
       [not found]     ` <BL0PR13MB427538CEAD5481CCBF6D195DF1889@BL0PR13MB4275.namprd13.prod.outlook.com>
@ 2022-07-14 19:47       ` Victoria Dye
  2022-07-14 20:05         ` fawaz ahmed0
  0 siblings, 1 reply; 4+ messages in thread
From: Victoria Dye @ 2022-07-14 19:47 UTC (permalink / raw)
  To: fawaz ahmed0, Git Mailing List

fawaz ahmed0 wrote:

Hi Fawaz,

Please make sure you "Reply-all" to include the mailing list in the
discussion, and make sure to inline or bottom-post your replies.

> I assume it's v2.37, you can reproduce it on github actions macos 12.

Per the virtual environment specification [1] linked in the runner execution
[2], the Git version used on these agents is 2.36.1. 

[1] https://github.com/actions/virtual-environments/blob/macOS-12/20220627.3/images/macos/macos-12-Readme.md
[2] https://github.com/fawazahmed0/currency-api/runs/7312663698?check_suite_focus=true#step:1:11

> 
> My github actions workflow didn't fail, even when I was setting pattern in cone mode.
> 
> please see: https://github.com/fawazahmed0/currency-api/actions/runs/2660320076/workflow#L31

Based on the commands you linked, combined with the fact that cone mode was
not made the default until v2.37, you're setting a wildcard pattern in *non*
cone mode. If you want to use cone mode in version v2.36, try running 'git
sparse-checkout reapply --cone' after your clone to set the appropriate
config.

> 
> 
> 
> 
> From: Victoria Dye <vdye@github.com>
> Sent: Friday, July 15, 2022 12:48 AM
> To: fawaz ahmed0 <fawazahmed0@hotmail.com>; git@vger.kernel.org <git@vger.kernel.org>
> Subject: Re: "reject arguments in cone-mode that look like patterns" doesn't work in macos-12 
>  
> fawaz ahmed0 wrote:
>> Please refer: https://github.com/git/git/commit/8dd7c4739bded62175bea1f7518d993b39b51f90#commitcomment-78433458
>>
>>
>> Using patterns in cone mode should fail, but it doesn't seem to fail on macOS-12(github actions)
> 
> Can you confirm which version is being used on that MacOS agent? For
> example, you could add a call to 'git version' in the workflow and see what
> it prints out. I suspect that the agent may be using an older version of
> Git, which would mean that the sparse-checkout is initialized in *non* cone
> mode.
> 
> For what it's worth, my local development machine is also MacOS 12 (running
> Git v2.37), and I'm correctly seeing the error in a cone mode
> sparse-checkout.
> 
>>
>> Step to reproduce(try in macOS-12):
>>
>> git clone --filter=blob:none --no-checkout --depth 1 --sparse https://github.com/fawazahmed0/currency-api.git . 
>> git sparse-checkout add 'latest/*'
>>
>> Thanks
>> Fawaz Ahmed


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: "reject arguments in cone-mode that look like patterns" doesn't work in macos-12
  2022-07-14 19:47       ` Victoria Dye
@ 2022-07-14 20:05         ` fawaz ahmed0
  0 siblings, 0 replies; 4+ messages in thread
From: fawaz ahmed0 @ 2022-07-14 20:05 UTC (permalink / raw)
  To: Victoria Dye, Git Mailing List



> Per the virtual environment specification [1] linked in the runner execution
> [2], the Git version used on these agents is 2.36.1. 

> [1] https://github.com/actions/virtual-environments/blob/macOS-12/20220627.3/images/macos/macos-12-Readme.md
> [2] https://github.com/fawazahmed0/currency-api/runs/7312663698?check_suite_focus=true#step:1:11

Sorry, I didn't know that every runner has it's own specification, I was actually referring the updated page:
https://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 

Maybe I should have manually checked the git version in runner, before filing this bug. 
Thank you for looking into this.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-14 20:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <BL0PR13MB42750BC5C4837B7B0BD1885EF1889@BL0PR13MB4275.namprd13.prod.outlook.com>
2022-07-14  8:00 ` "reject arguments in cone-mode that look like patterns" doesn't work in macos-12 fawaz ahmed0
2022-07-14 19:18   ` Victoria Dye
     [not found]     ` <BL0PR13MB427538CEAD5481CCBF6D195DF1889@BL0PR13MB4275.namprd13.prod.outlook.com>
2022-07-14 19:47       ` Victoria Dye
2022-07-14 20:05         ` fawaz ahmed0

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).