mirror of
https://github.com/systemd/systemd.git
synced 2026-11-06 13:27:45 +00:00
The dmidecode and fuzz tests are registered from the output of git ls-files when .git is a directory. In a git worktree, .git is a file that points to the repository, so we fall back to a shell glob. The glob also matches untracked files. A worktree then registers tests that the main checkout doesn't. Let's check whether .git exists instead, like the TIME_EPOCH check does. git reads the repository through the .git file that we pass to --git-dir. git ls-files fails when the repository isn't reachable, for example in a container that only mounts the worktree. When git ls-files fails, we fall back to the shell glob as well, instead of failing the setup.