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

Added Error message when nothing staged. #6

Merged
merged 9 commits into from
Oct 6, 2022
Merged

Conversation

lemonlambda
Copy link
Contributor

Errors and exits when you have not stagei anything with git.

(For Octoberfest)

@alt-art
Copy link
Owner

alt-art commented Oct 4, 2022

The code is not formatted, and the comparison will always be true because it will always return a response.
And you can use anyhow to send the message like this

return Err(anyhow!(
    "You have to stage your changes before committing, use `git add`"
));

@alt-art
Copy link
Owner

alt-art commented Oct 4, 2022

Tip: you need to verify the exit code number

@lemonlambda
Copy link
Contributor Author

I have made the changes

@alt-art
Copy link
Owner

alt-art commented Oct 4, 2022

you need to format your code, use cargo fmt

@lemonlambda
Copy link
Contributor Author

Done

@alt-art alt-art self-requested a review October 6, 2022 16:29
@alt-art alt-art merged commit b8a9948 into alt-art:main Oct 6, 2022
@alt-art alt-art added the hacktoberfest-accepted Hacktoberfest accepted contributions label Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Hacktoberfest accepted contributions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants