Closed fschrempf closed 2 weeks ago
Expected behavior gitlab-ci-local runs without failure even if
refs/remotes/origin/HEAD
is not available
most likely the issue whereas gitlab-ci-local
crashes will be resolved by https://github.com/firecow/gitlab-ci-local/pull/1256/files
is this the error you're getting?
if yes, then on the next release, this issue will most likely be fixed
A fix might be possible by parsing the output from git remote show origin to determine the default branch as described https://github.com/jhauberg/gitdoctor/issues/3#issuecomment-467979523.
yup, i think git remote show origin
will be a nice to have, but it's a very expensive operation. took ~ 4 seconds on my computer.
i don't think i'll be implementing it though, but if someone is, just take note of this, and maybe cache the result or something
Confirming that 4.51.0 seems to fix the issue. Thanks! Great work!
gitlab-ci-local
usesgit symbolic-ref --short refs/remotes/origin/HEAD
to determine the remote default branch in GitLab. Depending on how the local repository was setup, this might not be available (see this link for details) and causing failures like this:A workaround is to add the symbolic-ref manually as described here.
A fix might be possible by parsing the output from
git remote show origin
to determine the default branch as described here.Expected behavior
gitlab-ci-local
runs without failure even ifrefs/remotes/origin/HEAD
is not availableHost information Manjaro gitlab-ci-local 4.50.1
Containerd binary podman version 5.1.0