Repository navigation
Commit b787703
fix(server): selected-file commits stop when the index reset fails
Committing selected files resets the index first, but a failed `git reset`
was swallowed. If another git process held `.git/index.lock` during the
reset, the selected files were added to the old index and the commit also
included files the user had staged but left out of the selection.
Let the reset failure propagate so the commit stops with a GitCommandError
and nothing is committed. `git reset` on an unborn branch exits 0, so no
case needs the swallow anymore.
Co-Authored-By: Claude Opus 5.5 <[email protected]>1 parent 15fe283 commit b787703
2 files changed
Lines changed: 26 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4824 | 4824 | | |
4825 | 4825 | | |
4826 | 4826 | | |
| 4827 | + | |
| 4828 | + | |
| 4829 | + | |
| 4830 | + | |
| 4831 | + | |
| 4832 | + | |
| 4833 | + | |
| 4834 | + | |
| 4835 | + | |
| 4836 | + | |
| 4837 | + | |
| 4838 | + | |
| 4839 | + | |
| 4840 | + | |
| 4841 | + | |
| 4842 | + | |
| 4843 | + | |
| 4844 | + | |
| 4845 | + | |
| 4846 | + | |
| 4847 | + | |
| 4848 | + | |
| 4849 | + | |
| 4850 | + | |
| 4851 | + | |
4827 | 4852 | | |
4828 | 4853 | | |
4829 | 4854 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2421 | 2421 | | |
2422 | 2422 | | |
2423 | 2423 | | |
2424 | | - | |
2425 | | - | |
2426 | | - | |
| 2424 | + | |
2427 | 2425 | | |
2428 | 2426 | | |
2429 | 2427 | | |
| |||
0 commit comments