summaryrefslogtreecommitdiff
path: root/commit-graph.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2025-08-01 19:28:14 +0300
committerJunio C Hamano <gitster@pobox.com>2025-08-01 11:06:59 -0700
commit3bdd8974137d0348f599a9ba9d93f6ea9804e19a (patch)
tree9a72e129216b199108a52204a37caf9b5a6ed78b /commit-graph.c
parentf368df439b31b422169975cc3c95f7db6a46eada (diff)
meson: tolerate errors from git ls-files --deduplicate
When using the Meson build system with versions of Git before 2.31, 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. Signed-off-by: Martin Storsjö <martin@martin.st> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions