## 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
## Why
Collecting a diff previously launched a Git process for every untracked file at once, allowing process counts to grow with the number of files.
## What changed
Limit untracked-file diffs to eight concurrent operations per collection while preserving patch order and skipping failed file diffs. Concurrent collections each retain their own limit.
## Testing
Add tests for independent concurrency limits, failed-file handling, and patch order and application with tracked changes, binary files, and filenames containing spaces or a leading dash.
GitOrigin-RevId: 896e896eae62ba9b7acf3e8946c235fe725ced40