From: Karthik Nayak Date: Mon, 19 Oct 2026 18:51:40 GMT Subject: Re: [PATCH] gitlab-ci: fix "check" jobs with large merge requests Message-ID: In-Reply-To: Patrick Steinhardt writes: > On Fri, Oct 16, 2026 at 10:15:57AM -0700, Junio C Hamano wrote: >> Patrick Steinhardt 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. The patch itself looks good. [snip] >> 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've used both as a guidance rather than an enforcement and while neither have a bunch of false positives, they do help here and there. > 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 Sigh! I've tried to steer this for a while, but there are a bunch of issues: 1. We need to commit and start enforcing. 2. We need to fixate on a version of clang-format, since we support a bunch of CI environments, we end up with the lowest common denominator. Older versions do lack a bunch of rules 3. There are certain rules which are written down, but we often allow some leeway. Like wrapping long lines. 4. There aren't rules for all the styles we want to enforce, which means we still have to do a manual check. So I'm not sure we can ever come to a conclusion here. That's why the job is also allowed to fail on both CI platforms.