ci: squelch warnings when testing with unusable Git repo
commitdd02c3b68c67f8e9a5daca3b52a562318738fa47
authorPatrick Steinhardt <ps@pks.im>
Thu, 9 Nov 2023 08:05:46 +0000 (9 09:05 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 9 Nov 2023 09:56:10 +0000 (9 18:56 +0900)
tree3e8e73b77fefef4a11abdd2fe2589ee9bd18b82a
parent9f17bef9a6ead213ea62d399baa4c67e1e89398b
ci: squelch warnings when testing with unusable Git repo

Our CI jobs that run on Docker also use mostly the same architecture to
build and test Git via the "ci/run-build-and-tests.sh" script. These
scripts also provide some functionality to massage the Git repository
we're supposedly operating in.

In our Docker-based infrastructure we may not even have a Git repository
available though, which leads to warnings when those functions execute.
Make the helpers exit gracefully in case either there is no Git in our
PATH, or when not running in a Git repository.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ci/lib.sh