mirror of
https://github.com/openai/codex.git
synced 2026-12-03 00:41:03 +00:00
## Why `/diff` skipped staged patches, so users could miss changes that would go into their next commit. ## What changed Compare the index with `HEAD` and the working tree with the index. Show the staged patch under **Staged** and, when both are present, put the remaining patches under **Unstaged and untracked**. Keep Git operations local and show a warning alongside the working-tree patches if the staged comparison fails. ## Testing Cover staged files before the first commit and a staged edit that is reversed in the working tree. The tests also cover the staged comparison warning, missing blobs without a fetch, and the refreshed sidebar rendering both sections. GitOrigin-RevId: 2cb032d7766caf313363eb4c330abb3f6a95f017