-
-
Notifications
You must be signed in to change notification settings - Fork 281
feat(commands): add cz commit arg to automatically stage every tracked and un-staged file #821
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
feat(commands): add cz commit arg to automatically stage every tracked and un-staged file #821
Conversation
Codecov ReportPatch coverage is
📢 Thoughts on this report? Let us know!. |
commitizen/git.py
Outdated
@@ -92,6 +92,11 @@ def tag(tag: str, annotated: bool = False, signed: bool = False) -> cmd.Command: | |||
return c | |||
|
|||
|
|||
def add() -> cmd.Command: | |||
c = cmd.run("git add .") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is what -a
does. In this case even non-tracked files are being added. -a
should happen on git commit -a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I misunderstood what git commit -a usage. I will modify this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yes, I think I misunderstood during the sprint as well 🫠 I belive you can check how the signoff feature is implemented. They are supposed to be similar
I wonder what's the advantage of doing |
I do |
yep, agree with your point. @woile what do you think? |
Sounds good |
…add all to git add update
e8b2a88
to
a8bb1d1
Compare
Description
Adding
cz commit
arg to automatically stage every tracked and un-staged fileChecklist
./scripts/format
and./scripts/test
locally to ensure this change passes linter check and testExpected behavior
command
cz commit -a
will automatically stage every tracked and un-staged file .Steps to Test This Pull Request
Additional context
#554