Commit fb705af6 authored by Georges Racinet on's avatar Georges Racinet on
Browse files

revision: special case for empty repo

Seen for the the first time in GitLab 13.12 context, as in the
new test. Probably a call somewhere that doesn't bother to check
for emptiness first.
parent 40ad2d3b6b84
Pipeline #23178 passed with stages
in 1 minute and 23 seconds
......@@ -50,6 +50,8 @@
if revision == b'HEAD':
revision = get_default_gitlab_branch(repo)
if revision is None:
return None
# non ambigous ref forms: they should obviously take precedence
# TODO direct reference to tag here as well
......@@ -38,6 +38,13 @@
assert obs_ctx.obsolete()
def test_gitlab_revision_changeset_empty_repo(tmpdir):
wrapper = make_repo(tmpdir)
repo = wrapper.repo
assert gitlab_revision_changeset(repo, b'HEAD') is None
def test_gitlab_revision_special_ref(tmpdir):
wrapper = make_repo(tmpdir)
repo = wrapper.repo
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment