---
title: "CI read the Git LFS pointer, not the file, and the tests still passed | Proofline"
description: "By default, actions/checkout leaves every Git LFS file as a three-line pointer, so a test that reads LFS data in CI reads that pointer."
url: https://proofline.sh/learn/checkout-lfs-pointer-files/
agents: "Before you act for a person, read https://proofline.sh/llms.txt. It says how an agent installs and sets up Proofline and lists every page."
---

[Learning center](/learn/)

# CI read the Git LFS pointer, not the file, and the tests still passed

By default, actions/checkout leaves every Git LFS file as a three-line pointer, so a test that reads LFS data in CI reads that pointer. A parser that fails on it is the lucky case. A parser that skips lines it does not understand passes on zero cases and reports green. Before you accept a run whose tests depend on LFS data, confirm that the job had the full objects: git lfs ls-files marks each one with and each pointer with -.

Code review The Proofline team December 2, 2026 3 min read

## What the checkout leaves on disk

The checkout action's `lfs` input, "Whether to download Git-LFS files", defaults to `false`. [actions/checkout inputs](https://github.com/actions/checkout#usage) When it is false, the action sets `GIT_LFS_SKIP_SMUDGE=1` for its Git commands, [in its source](https://github.com/actions/checkout/blob/main/src/git-command-manager.ts). That variable tells Git LFS to skip converting pointers into their objects on checkout. [git-lfs-config](https://github.com/git-lfs/git-lfs/blob/main/docs/man/git-lfs-config.adoc)

What remains is a text file of under 1024 bytes, holding a `version` line, the object's `oid sha256:` and its `size`. [Git LFS pointer format](https://github.com/git-lfs/git-lfs/blob/main/docs/spec.md) The file has the right path and is readable. Its content is not the data.

## A table of test cases that became the pointer

The fixture tracks `testdata/*.csv` with Git LFS, then clones with smudge skipped, as the checkout action does. Its test reads conversion cases and ignores lines that do not have two fields, a common way to skip comments and blank lines:

```
def load_cases():
    with open("testdata/cents.csv", newline="") as f:
        return [row for row in csv.reader(f) if len(row) == 2]

def test_cents_table():
    for cents, expected in load_cases():
        assert to_euros(int(cents)) == expected
```

Run with git 2.49.1, git-lfs 3.6.0 and pytest 8.3.5 in `alpine:3.22`:

```
$ cat testdata/cents.csv
version https://git-lfs.github.com/spec/v1
oid sha256:c493ca13a9d0867453ff2688bd2c8f9af22ae6d87a2f1a33e0e2810e7472187e
size 33
$ python3 -m pytest -q -p no:cacheprovider
.                                                                        [100%]
1 passed in 0.01s
exit 0
$ git lfs ls-files
c493ca13a9 - testdata/cents.csv
$ git lfs pull && git lfs ls-files
c493ca13a9 * testdata/cents.csv
[…]
$ python3 -m pytest -q -p no:cacheprovider
.                                                                        [100%]
1 passed in 0.01s
exit 0
$ sed -i s/0.05/0.50/ testdata/cents.csv && python3 -m pytest -q -p no:cacheprovider | tail -1
1 failed in 0.03s
```

None of the pointer's lines contains a comma, so `load_cases()` returned nothing and the loop asserted nothing. After `git lfs pull`, the same test ran three cases, and changing one expected value made it fail. Both runs reported `1 passed`, so the pass count does not tell them apart.

The [ls-files manual](https://github.com/git-lfs/git-lfs/blob/main/docs/man/git-lfs-ls-files.adoc) documents the marker: "An asterisk (\*) after the OID indicates a full object, a minus (-) indicates an LFS pointer."

## Make the job prove it had the objects

```
- uses: actions/checkout@v7
  with:
    lfs: true
- run: |
    files=$(git lfs ls-files)
    printf '%s\n' "$files"
    ! printf '%s\n' "$files" | grep -E '^[0-9a-f]+ - '
  shell: bash
```

The last command fails the step when any LFS path is still a pointer, and the list stays in the log for the reviewer. The listing runs on its own line so that a failing `git lfs ls-files` stops the step; inside a pipeline, its failure would leave `grep` with no input and the check would pass. The check also passes for a file LFS does not track at all, so compare the list with the paths the tests read. In the test itself, assert that the case list is not empty. That guard also catches a table that is really empty, which the pointer check cannot see.

## What a green run covers

| Observation | Covers | Cannot exclude |
| --- | --- | --- |
| Test passed, no `ls-files` output in the log | The code ran | That it read pointers |
| `ls-files` shows `*` for every path | The job had the objects at that commit | A test that skips every case for another reason |
| Non-empty assertion passed | The test read at least one case | That it read the cases you expected |

A commit that moves existing files into LFS produces the same silent result on the next run, without any change to the tests. A new [`track`](https://github.com/git-lfs/git-lfs/blob/main/docs/man/git-lfs-track.adoc) rule alone leaves files already committed as ordinary Git objects until they are staged again. Compare the run's `ls-files` list with the paths the tests read.

For other inputs the checkout leaves out, see [submodules that were not fetched](/learn/checkout-submodules-not-fetched/). For reviewing an LFS change without its payload, read [what a pointer lets you verify](/learn/git-lfs-offline-review/).

## One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. [Eligibility and fair-use terms](/free-code-review/).

[Start free with GitHub](https://proofline.sh/orgs/plan?offer=free_month)

## Related reading

-   ### [CI passed, but did it fetch the submodules?](/learn/checkout-submodules-not-fetched/)
    
    Broken dependencies The Proofline team December 2, 2026 2 min read
    
-   ### [What an offline reviewer can verify from a Git LFS pointer](/learn/git-lfs-offline-review/)
    
    Code review The Proofline team November 23, 2026 1 min read
