---
title: "Did QA test the code that was merged? | Proofline"
description: "Compare Git trees, because a squash merge always creates a new commit ID even when every file is identical."
url: https://proofline.sh/learn/qa-tested-commit-squash-merge/
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/)

# Did QA test the code that was merged?

Compare Git trees, because a squash merge always creates a new commit ID even when every file is identical. Run git rev-parse COMMIT^{tree} to get the identity of the files.

Deployment failures The Proofline team November 24, 2026 2 min read

## Same files, different commit

In the fixture, QA tests the head of `feat`. The branch is squash-merged onto a `main` that has not moved.

|  | Commit | Tree |
| --- | --- | --- |
| Tested, `feat` | `8dac2d4` | `4fdcd9b` |
| Merged, `main` | `89f35f1` | `4fdcd9b` |

The trees match, so every tracked file has the same content, name and mode. `git merge-base --is-ancestor feat main` exits 1, because a squash leaves no ancestry. A script that looks for the tested commit in `main` would report that QA's build never shipped.

Then `main` gains an unrelated file `b` before the squash. The merged tree becomes `9741da4`, and the difference is one file:

```
$ git diff --stat feat main
 b | 1 +
```

Run with Git 2.43.

## Decide from the two trees

```
git rev-parse TESTED^{tree} MERGED^{tree}
git diff --stat TESTED MERGED
```

| Result | Decision |
| --- | --- |
| Trees equal | The result applies to the merged source. Check the build inputs below |
| Trees differ, and the diff is outside what the test exercised | Someone who knows the dependency between the two decides, and writes down why |
| Trees differ inside it | Test again on the merged commit |
| The tested commit cannot be found | The result has no known subject. Test again |

The last row happens after a force push. If the pull request still records the head, its commit can usually be fetched by ID from the server. Keep the tree ID in the QA note and you can compare even when the commit object is gone.

## Equal trees are not equal builds

The tree covers tracked files. Two builds of one tree can still differ in:

-   dependencies, when the install does not use the lockfile;
-   the base image, when it is named by a tag that moved;
-   build arguments, feature flags and environment variables;
-   generated files that are not tracked;
-   submodules, whose tree entry is a commit ID, and LFS files, which are pointers.

A record of the artifact's digest closes most of that gap. If QA tested digest X and digest X was deployed, the source question is moot, and the remaining differences are in configuration and data.

## What to write in the handoff

> Tested commit `8dac2d4`, tree `4fdcd9b`, image digest `sha256:…`, staging, 2026-11-24 09:10 UTC. Export with 0, 1 and 5,000 rows: pass. Not tested: export while a deploy is running.

The tree is the field that survives a squash or a rebase onto the same base.

## Worked example

This example is fictional. A release engineer finds QA notes for nine changes. For six, the trees match. Two differ by documentation files. The ninth differs by a change to the currency formatter, which merged an hour before the export change that QA had tested. The export calls that formatter. The decision is one rerun of the export cases on `main`, and the other eight changes wait for nothing.

When the evidence was written as a Git note, [it may not have travelled](/learn/git-notes-missing-after-clone/). Return to [handing over evidence](/learn/engineering-handoff-evidence/).

## 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

-   ### [Which commit did the pull request's tests run on?](/learn/pull-request-head-or-merge-commit/)
    
    Code review The Proofline team November 24, 2026 2 min read
    
-   ### [Give QA the list of what you did not test](/learn/developer-to-qa-handoff-not-tested/)
    
    Code review The Proofline team November 24, 2026 3 min read
