Checked
git diff or a step-by-step record?
git diff is enough if you only care about the end result and it’s all tracked by git.
git diff |
step-by-step (belay) | |
|---|---|---|
| Compares | working tree vs last commit | before vs after each tool call |
| Changed, then put back | not seen | put back / touched |
| Which call did it | no | yes |
| Ignored files | no | yes |
.git/hooks, .git/config |
no | yes; a new hook is flagged |
| Undo | git restore |
none |
Why the end state can mislead
- Main page: a scripted session edits a test, runs it, restores it with
git checkout.git diffis empty; belay saysput back. - Test-changes report: 18 of 2,115 runs changed a test, then ran a git command to restore it. The sandbox had no git, so all 18 failed. With git present, those commands put both files back byte for byte (probed on git 2.43): a fact about git, not about what these runs would have done. None of the 18 reports says it changed a test; 2 point at it.
- Rerun: a scripted control run that edited and restored
test.pypassed the benchmark’s end-state check as clean.