ci: don't pollute git with remote branches

This commit is contained in:
arcnmx 2021-05-19 11:25:46 -07:00
parent b9b9db4067
commit 841f253434

View file

@ -49,10 +49,11 @@ with lib; {
chmod 0600 ~/.ssh/id_rsa
fi
git init -q sources
${concatStringsSep "\n" (mapAttrsToList (source: spec: let
update = "niv update ${source}";
fetch = "timeout 30 git fetch -q --depth 1 ${spec.repo} ${spec.branch}:source-${source}";
revision = "$(git show-ref -s source-${source})";
fetch = "timeout 30 git -C sources fetch -q --depth 1 ${spec.repo} ${spec.branch}:source-${source}";
revision = "$(git -C sources show-ref -s source-${source})";
isGit = hasPrefix "https://" spec.repo or "";
git = ''
if ${fetch}; then