Repository navigation
feat: offer to stage everything when committing with nothing staged - #3
Merged
Merged
Conversation
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the second layer of three and sits on the Tab-only drafting layer. Pressing Enter in the commit box with nothing staged only showed an error, so you had to leave the box, stage, and come back. A drafted message often describes every change anyway: with nothing staged, the draft is written from the unstaged diff.
What changed
Enter with nothing staged now asks:
⏎stages everything (git add -A, which includes untracked files) and commits.sgoes back to the file list and keeps the message.esccancels.The question takes priority over status messages, so a second Enter never answers it unseen. In a narrow pane it drops its red
nothing staged ·label so all three choices fit. Leaving the commit box clears the question. With no changes at all, it saysnothing to commit.Evidence
Same scratch repo (one modified file, one untracked file), same 47-column Rex pane, with a message typed and Enter pressed. "Before" is
main. These are realrex capturelines.Before:
After:
After pressing
⏎again:sreturned to the list with the message kept, andc⏎asked again. Before the priority fix, a status message fromshid the question, and the next Enter committed. That's how I found the bug. The branch builds with no new warnings.ELI5
If you try to save your work without picking which files to save, it now offers to save all of them instead of just saying no.