From: Phillip Wood Date: Mon, 21 Apr 2025 18:54:16 GMT Subject: Re: [PATCH v4 0/5] meson: add corresponding target for Makefile's hdr-check Message-ID: <3389d086-4e6e-4896-94dd-9f62d7c4f2df@gmail.com> In-Reply-To: On 21/04/2025 16:41, Junio C Hamano wrote: > Phillip Wood writes: > >> "git ls-files" is complaining that there isn't a git >> repository. Looking at the output of the checkout action (reproduced >> below) it appears it is extracting a tarball rather than using "git >> clone" because git is not available. I don't know what the best way to >> fix that is - I guess we could run "apt-get install git" before >> calling the checkout action. > > Interesting. The use of actions/checkout@v4 is nothing new in > Karthik's series and we haven't seen this issue come up. What's so > different with this particular series, I have to wonder... Good Question. Looking at contrib/coccinelle/meson.build which is where the invocation of "git ls-files" has been moved from it starts with coccinelle_opt = get_option('coccinelle').require( fs.exists(meson.project_source_root() / '.git'), error_message: 'coccinelle can only be run from a git checkout', ) I think it is probably fine to skip checking our headers and running coccinelle when we don't have a git repository but we should ensure the meson build can still be configured in that case by skipping those targets. The Makefile falls back to using "find" if "git ls-files" fails which is another option. Best Wishes Phillip