From: Patrick Steinhardt <ps@pks.im>
To: "Martin Storsjö" <martin@martin.st>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v3] meson: Tolerate errors from git ls-files --deduplicate
Date: Fri, 1 Aug 2025 16:44:10 +0200 [thread overview]
Message-ID: <aIzSun25-RhmAfOd@pks.im> (raw)
In-Reply-To: <20250801102554.1904715-1-martin@martin.st>
On Fri, Aug 01, 2025 at 01:25:41PM +0300, Martin Storsjö wrote:
> When using the Meson build system with an old-enough Git version
> that does not yet know the `git ls-files --deduplicate` option one
> can observe the following error:
>
> ../meson.build:697:19: ERROR: Command `/usr/bin/git -C /home/martin/code/git ls-files --deduplicate '*.h' ':!contrib' ':!compat/inet_ntop.c' ':!compat/inet_pton.c' ':!compat/nedmalloc' ':!compat/obstack.*' ':!compat/poll' ':!compat/regex' ':!sha1collisiondetection' ':!sha1dc' ':!t/unit-tests/clar' ':!t/t[0-9][0-9][0-9][0-9]*' ':!xdiff'` failed with status 129.
>
> The failing command is used to find all header files in our code
> base, which is required for static analysis.
>
> Static analysis is an entirely optional feature that distributors
> typically don't care about, and we already know to skip running the
> command when we are not in a Git repository. But we do not handle
> the above failure gracefully, even though we could.
>
> Fix this by passing `check: false` to `run_command`, which makes it
> tolerate failures. Then check `returncode()` manually to decide
> whether to inspect the output.
Thanks, this version looks good to me!
Patrick
next prev parent reply other threads:[~2025-08-01 14:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-31 12:15 [PATCH] meson: Check whether git is new enough to support ls-files --deduplicate Martin Storsjö
2025-08-01 5:27 ` Patrick Steinhardt
2025-08-01 7:55 ` Martin Storsjö
2025-08-01 7:56 ` [PATCH v2] meson: Tolerate errors from git " Martin Storsjö
2025-08-01 9:23 ` Patrick Steinhardt
2025-08-01 9:42 ` Martin Storsjö
2025-08-01 9:45 ` Patrick Steinhardt
2025-08-01 10:24 ` Martin Storsjö
2025-08-01 10:25 ` [PATCH v3] " Martin Storsjö
2025-08-01 14:44 ` Patrick Steinhardt [this message]
2025-08-01 15:59 ` [PATCH v2] " Junio C Hamano
2025-08-01 16:27 ` Martin Storsjö
2025-08-01 16:28 ` [PATCH v4] " Martin Storsjö
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aIzSun25-RhmAfOd@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=martin@martin.st \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).