Files
codex/codex-rs/git-utils/src
Charlie Marsh d916a952a7 Preserve slashes in default branch names for remote diffs (#63386)
## Why

When the remote's default branch is `release/stable`, taking only the
last segment of its ref can make Codex diff against `stable` and include
changes already present on the default branch.

## What changed

Strip the `refs/remotes/<remote>/` prefix from the remote HEAD's
symbolic ref to preserve the full branch name.

## Testing

Add a regression test with both `origin/stable` and
`origin/release/stable`. It checks that the diff uses the
`release/stable` commit as its base and includes only the feature change.

GitOrigin-RevId: 527cfe47b5fecb9c178f9cfeb095ec66c6219260
2026-11-23 17:26:33 +00:00
..
…
…