What Is a CL in Software Engineering?
In software engineering, CL is short for changelist: one self-contained set of code changes sent for review. It is the unit that a reviewer reads and approves.
The term comes from Google, which uses CL the way most GitHub users say pull request. Perforce, the version control system, uses the same word for a group of files submitted together.
A CL has one purpose. It should add one feature, fix one bug, or do one cleanup, and nothing else.
What a CL contains
| Part | What it holds |
|---|---|
| Description | A one line summary, then why the change is needed. |
| Diff | The added, removed and changed lines. |
| Tests | New or updated tests that prove the change works. |
| Reviewers | The people who must approve before it lands. |
| Bug link | The ticket that asked for the work. |
The description is read far more often than the code. It ends up in the commit history, where future engineers use it to find out why a line exists.
CL, PR, MR and diff mean the same thing
Different companies and tools use different words for the same unit of review.
| Word | Where it is used |
|---|---|
| CL, changelist | Google, and Perforce based systems |
| Pull request, PR | GitHub, Bitbucket |
| Merge request, MR | GitLab |
| Diff | Meta, and Phabricator based tools |
| Patch | Mailing list workflows such as the Linux kernel |
If a job description or an interviewer says CL, read it as pull request. The review steps are the same.
The life of a CL
- You write the change on your own branch or client.
- You send it for review with a description and the tests.
- Reviewers leave comments, and you answer each one.
- A reviewer approves it.
- Automated tests run, and the change is merged into the main branch.
How big should a CL be
Small. Google's public code review guide describes about 100 lines as a reasonable size and around 1,000 lines as too large.
The reason is measurable. A reviewer reading 100 lines finds real problems. The same reviewer reading 1,000 lines approves it and finds almost nothing.
| CL size | Usual review time | Usual outcome |
|---|---|---|
| Under 100 lines | Under an hour | Careful review, useful comments |
| 100 to 400 lines | A few hours | Still useful, but slower |
| Over 1,000 lines | Days | Rubber stamped, defects missed |
Split large work into a sequence of CLs. Refactor in one, add the feature in the next, then update the callers.
What reviewers check
- Correctness. Does it do what the description says, including the error paths.
- Tests. Is there a test that fails without the change.
- Design. Does it fit the existing structure, or work against it.
- Naming and clarity. Can a new engineer read it in a year.
- Scope. Does it contain anything unrelated to the stated purpose.
Reply to every comment, even if the reply is one word. An unanswered comment stalls the CL.
Other meanings of CL
The letters are used elsewhere in computing, so check the context first.
| Context | Meaning |
|---|---|
| Code review, Google, Perforce | Changelist |
| Windows and Visual Studio | cl.exe, the Microsoft C and C++ compiler command |
| Programming languages | Common Lisp |
File names ending in .cl | An OpenCL kernel file, or a Common Lisp source file |
Web addresses ending in .cl | The country domain for Chile |
In an engineering conversation about review, changelist is almost always the right reading.
How to Prepare
- Write the description first. One line of summary, then the reason. Do it before you open the code.
- Keep each change to one purpose. If you cannot describe it in one sentence, split it into two changes.
- Learn the reviewer side. Best practice for code review and the golden rule of code review cover what strong reviewers do.
- Use a checklist until it is a habit. See a code review checklist and the principle of code review.
- Practice the code that gets reviewed. Grokking the Coding Interview trains the clear, small solutions that pass review quickly.
- Explain your choices out loud. A mock interview builds the same skill that answering review comments needs.

GET YOUR FREE
Coding Questions Catalog

$123

$197

$72