Merge branch 'ms/meson-with-ancient-git-wo-ls-files-dedup'

Build fix.

* ms/meson-with-ancient-git-wo-ls-files-dedup:
  meson: tolerate errors from git ls-files --deduplicate
This commit is contained in:
Junio C Hamano
2025-08-04 08:10:35 -07:00

View File

@@ -694,9 +694,14 @@ third_party_excludes = [
headers_to_check = [] headers_to_check = []
if git.found() and fs.exists(meson.project_source_root() / '.git') if git.found() and fs.exists(meson.project_source_root() / '.git')
foreach header : run_command(git, '-C', meson.project_source_root(), 'ls-files', '--deduplicate', '*.h', third_party_excludes, check: true).stdout().split() ls_headers = run_command(git, '-C', meson.project_source_root(), 'ls-files', '--deduplicate', '*.h', third_party_excludes, check: false)
headers_to_check += header if ls_headers.returncode() == 0
endforeach foreach header : ls_headers.stdout().split()
headers_to_check += header
endforeach
else
warning('could not list headers, disabling static analysis targets')
endif
endif endif
if not get_option('breaking_changes') if not get_option('breaking_changes')