-
Notifications
You must be signed in to change notification settings - Fork 3
Improve status output #55
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
Improve status output #55
Conversation
src/subcommand/status_subcommand.cpp
Outdated
| // } | ||
| // } | ||
|
|
||
| if (!sl.has_tobecommited_header() & (sl.has_notstagged_header() | sl.has_untracked_header())) |
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 think these should be && and || (logical operators) rather than & and | (bitwise operators).
src/subcommand/status_subcommand.cpp
Outdated
| } | ||
| } | ||
|
|
||
| if (!sl.has_notstagged_header() & !sl.has_untracked_header()) |
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.
Similar here.
src/subcommand/status_subcommand.cpp
Outdated
| // "No changes added to commit (use \"git add\" and/or \"git commit -a\")" | ||
| // (use \"git restore --staged <file>...\" to unstage)\n | ||
| // (use \"git reset HEAD <file>...\" to unstage)\n"; | ||
| const std::string ignored_header = "Ignored files:\n Ignored files:\n (use \"git add -f <file>...\" to include in what will be committed)\n"; |
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.
Is the repeat of "Ignored files:\n" intended here?
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.
No, I'll remove one. I'll also comment it as it's not used so far.
ianthomas23
left a comment
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.
Thanks @SandrineP
Improve status output: