From 82de36f77a2766258cf622b65c3dc9d016ddb969 Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Fri, 31 May 2024 21:12:04 +0200 Subject: [PATCH] libfetchers: allow fetching gitlab refs with >1 commit Change-Id: I945c4c5512def9eff728bb67fe3c03ae17f99d6d --- src/libfetchers/github.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libfetchers/github.cc b/src/libfetchers/github.cc index 3129e0d73..60fefd1f3 100644 --- a/src/libfetchers/github.cc +++ b/src/libfetchers/github.cc @@ -322,7 +322,7 @@ struct GitLabInputScheme : GitArchiveInputScheme readFile( store->toRealPath( downloadFile(store, url, "source", false, headers).storePath))); - if (json.is_array() && json.size() == 1 && json[0]["id"] != nullptr) { + if (json.is_array() && json.size() >= 1 && json[0]["id"] != nullptr) { auto rev = Hash::parseAny(std::string(json[0]["id"]), htSHA1); debug("HEAD revision for '%s' is %s", url, rev.gitRev()); return rev;