You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cb2cd0d
Browse filesBrowse the repository at this point in the historyBrowse files
committed
fix(git): refuse to commit when nothing is staged (#4762)
repo.index.commit() writes a tree unconditionally, so git_commit with
nothing staged created an empty commit and reported its hash as a
success. It now refuses with an error, as `git commit` does without
--allow-empty, while still allowing the first commit on an unborn
branch and an empty merge commit while MERGE_HEAD is present.
The protocol test that pinned the empty commit (KNOWN BUG #4762) now
asserts the refusal.
Ported from #4761 by Connor Moss.
Co-authored-by: Connor Moss <Conmoss30@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: cliffhall <cliff@futurescale.com>
0 commit comments