Lesstep
GitLab.com and Self-Managed · repository compare API · Checked October 29, 2026

GitLab: "compare_timeout": true from the compare API

When you compare two branches, tags or commits with GET /projects/:id/repository/compare, GitLab can answer "compare_timeout": true. The GitLab docs say that the comparison then exceeded size limits or timed out, and that the diffs array might be incomplete (Repositories API, checked October 29, 2026). In the GitLab source, the field is the overflow of the diff list: it is true when the comparison has more changed files or lines than the instance shows in one diff, whatever the time it took.

GET /api/v4/projects/:id/repository/compare?from=main&to=feature

{"commit": {...},
 "commits": [...],
 "diffs": [...],
 "compare_timeout": true,
 "compare_same_ref": false,
 "web_url": "https://gitlab.example.com/group/project/-/compare/main...feature"}

What the field means

The compare entity of the API (lib/api/entities/compare.rb) sets compare_timeout to the overflow? of the diff collection it returns. That collection is built with the diff options of the instance (app/models/commit.rb, max_diff_options): at most diff_max_files files and diff_max_lines changed lines. So the name says timeout, but the usual reason is size: a comparison with more files or lines than these limits answers true every time you ask.

The limits

From Diff limits (checked October 29, 2026):

On GitLab Self-Managed and GitLab Dedicated, an administrator can change them in Admin > Settings > General > Diff limits. On GitLab.com, diff limits cannot be configured.

Why a comparison gets this large

What to do

GitLab merge requests in IntelliJ IDEA

Lesstep makes Merge Request Inbox for GitLab for JetBrains IDEs 2024.1 or later. It marks the files that changed since you last opened a merge request: it compares the head you saw with the new head, directly. When GitLab answers compare_timeout true, the plugin cannot tell which files the push touched, so it shows no changed marks for that push and clears the viewed marks of that merge request, so that no file stays marked as viewed when it may have changed. Reading is free; approving, commenting and merging are Pro (US$1.50 a month, with a 30-day trial).

GITLAB is a trademark of GitLab Inc.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by GitLab Inc. or JetBrains.

More: GitLab merge request changes cut short ("1000+", too_large) · GitLab 429 "Retry later" (rate limits) · GitLab merge refused (405, 409, 422) · GitLab merge request list refused (400, 404) · GitLab 404 "Project Not Found" · GitLab merge request plugins for IntelliJ IDEA, compared · 日本語