-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
When executed with no files in the staging area, interactive questions are displayed despite there being no files to commit, and after answering all questions, the commit fails with an error.
Describe the solution you'd like
I would like koji to exit early before displaying interactive questions when executed with no files in the staging area.
This would help users recognize mistakes earlier and prevent the unnecessary effort of re-answering their questions.
Describe alternatives you've considered
None.
Additional context
This is an excellent tool! I would love to use it actively and have a few requests.
I usually use czg, and I think koji could become an even more attractive tool by referencing some of its features.
in czg, if there are no files in the staging area, it exits early with the following behavior:
~/.local/share/chezmoi % git status
On branch main
Your branch is ahead of 'origin/main' by 2 commits.
(use "git push" to publish your local commits)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: dot_zshrc.lazy.tmpl
no changes added to commit (use "git add" and/or "git commit -a")
~/.local/share/chezmoi % koji
> What type of change are you committing? feat
> What's the scope of this change?
> Write a short, imperative tense description of the change: x
> Provide a longer description of the change:
> Are there any breaking changes? No
> Does this change affect any open issues? No
Error: On branch main
Untracked files :
modified: dot_zshrc.lazy.tmpl
nothing added to commit but untracked files present (use "git add" to track)
~/.local/share/chezmoi % czg
>>> No files added to staging! Did you forget to run `git add` ?
~/.local/share/chezmoi % Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request