The Generated output CI job only tests for modified files. This job
should also fail the generated output contains new files.
It would be possible to test modified and untracked files in one
execution of git ls-files. However the diff is stored as an artifact
so the execution of git diff would still be required.
Discussion: Would it be better to do git ls-files -om and remove the
excution of
! grep -q '^--- a' ${BUILD_DIR}/generated_output.patch || false ?
(Obviously then the name generated_output.untracked should change to
something like generated_output.status)
Would something like this work: