Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider warning user if convco commit is run without any staged files #146

Closed
cafkafk opened this issue Sep 18, 2023 · 4 comments
Closed
Labels
enhancement New feature or request

Comments

@cafkafk
Copy link

cafkafk commented Sep 18, 2023

Is your feature request related to a problem? Please describe.
It's very frustrating when I run convco commit, type all the fields, only to find that I didn't stage any files with git add.

Describe the solution you'd like
I would prefer if convco commit printed a warning to the screen, informing me that I haven't staged any files.

Describe alternatives you've considered
I've thought that it could be automated, but that would be hard to do in a way that everyone likes, and a lot more work than just a warning that solves the most frustrating part.

Additional context
I don't have any.

@cafkafk cafkafk added the enhancement New feature or request label Sep 18, 2023
@hdevalke
Copy link
Collaborator

At the moment convco commit is indeed building up the commit message, and then executing the git cli.

You could use convco commit -- -a to add all files.

Quick solution could be that we run git add -N and git add -p before, such that you can add the changes that are needed.

hdevalke added a commit that referenced this issue Sep 19, 2023
To avoid forgetting to commit unstaged changes, commit will run `git add -N && git add -p` before showing the wizzard.

Refs: #146
@hdevalke
Copy link
Collaborator

I made PR #148 to add git add -N . and git add -p to be run before showing the wizard and running git commit ..

@cafkafk
Copy link
Author

cafkafk commented Sep 19, 2023

Awesome, can't wait for this to be merged!

hdevalke added a commit that referenced this issue Sep 26, 2023
To avoid forgetting to commit unstaged changes, commit will run `git add -N && git add -p` before showing the wizzard.

Refs: #146
@hdevalke
Copy link
Collaborator

#151 adds the options --intent-to-add and --patch. This will disable the behavior to automatically do it, but you will be able to use environment variables to override the defaults.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants