git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] gitlab-ci: fix "check" jobs with large merge requests

From
Patrick Steinhardt <ps@pks.im>
Date
Oct 19, 2026, 06:56 UTC
Message-ID
<atW_BmTQhxFRLc0a@pks.im>
In-Reply-To
<xmqqtsmlftwy.fsf@gitster.g>
On Fri, Oct 16, 2026 at 10:15:57AM -0700, Junio C Hamano wrote:
Show 21 quoted lines
> Patrick Steinhardt <ps@pks.im> writes:
> 
> > The "check-whitespace" and "check-style" jobs verify that the changes
> > proposed by a merge request don't introduce whitespace errors or style
> > violations. To do so, both of them compare against the base commit of
> > the merge request.
> >
> > But both GitHub and GitLab use shallow clones to set up the repository
> > in CI jobs by default. So if the base commit to compare against is
> > beyond the shallow boundary then these checks will fail. To avoid that
> > error we thus configure GitHub CI to disable shallow clones via
> > `fetch-depth: 0`. But we don't do the equivalent for GitLab, so we see
> > such errors whenever we have a merge request with more than 50 commits,
> > which is the configured shallowness for gitlab-org/git.
> >
> > Fix these issues by setting GIT_DEPTH to 0 for both jobs so that we
> > always fetch the full history.
> 
> Hmph, that is annoying.  In theory, you only need to fetch from the
> base that the patch series is designed to apply, but I guess that is
> not a choice offered.
No, unfortunately it's not.
> How much help are we really getting from these two jobs, by the way?
> If we disabled them, would we suddenly start seeing uncontrollable
> amount of crap patches full of whitespace breakages and style
> violations?
I tend to ignore those myself:
  - "check-style" is not all that useful as we don't fully submit us to
    clang-format's style, so whatever it generates is not authoritative
    anyway.
  - "check-whitespace" was quite useless to me because it breaks rather
    frequently.

I still think that "check-style" _could_ be useful, but only if we fully commit to clang-format. It would remove a whole class of nitpicks and thus reduce the burden on both newcomers and reviewers. But that's a discussion I don't really want to lead :)

Patrick
Previous: Junio C HamanoNext: Karthik Nayak
Message 3 of 6 in “gitlab-ci: fix "check" jobs with large merge requests”
  1. gitlab-ci: fix "check" jobs with large merge requestsPatrick Steinhardt, Oct 16, 2026
  2. Junio C HamanoOct 16, 2026
  3. Patrick SteinhardtOct 19, 2026
  4. Karthik NayakOct 19, 2026
  5. Junio C HamanoOct 19, 2026
  6. Patrick SteinhardtOct 20, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.