The snap git version script
(via snapcraft.yaml -> setup.py version -> setuptools scm version)
needs git history available so it can correctly set the git version.
actions/checkout@v4 only fetches a single revision by default,
which means the git version script will not return expected results.
So we must set fetch-depth to 0 to get the full git version history,
so it's available for the git version script.
The snap git version script (via snapcraft.yaml -> setup.py version -> setuptools scm version) needs git history available so it can correctly set the git version.
actions/checkout@v4 only fetches a single revision by default, which means the git version script will not return expected results.
So we must set fetch-depth to 0 to get the full git version history, so it's available for the git version script.