aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLinus Heckemann <git@sphalerite.org>2024-06-01 09:54:11 +0000
committerGerrit Code Review <gerrit@lix-systems>2024-06-01 09:54:11 +0000
commit5312e60be6aba84fab91e6d82af0b1aeccdfe981 (patch)
tree0adb89202431f4b174a7adf165355658909701da /src
parentc7ca87461dff6892b166e46203024cb82bd89e55 (diff)
parent82de36f77a2766258cf622b65c3dc9d016ddb969 (diff)
Merge "libfetchers: allow fetching gitlab refs with >1 commit" into main
Diffstat (limited to 'src')
-rw-r--r--src/libfetchers/github.cc2
1 files changed, 1 insertions, 1 deletions
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;