FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Improve status output by SandrineP · Pull Request #55 · QuantStack/git2cpp · GitHub

Repository navigation

Improve status output - #55

Merged
ianthomas23 merged 3 commits into
QuantStack:mainfrom
SandrineP:status_nothing_to_commit
Nov 10, 2025
Merged

ianthomas23 merged 3 commits into
QuantStack:mainfrom
SandrineP:status_nothing_to_commit

Conversation

Copy link
Copy Markdown
Collaborator

Improve status output:

  • add "nothing to commit" message
  • correct the output of untracked files

Comment thread src/subcommand/status_subcommand.cpp Outdated
// }
// }

if (!sl.has_tobecommited_header() & (sl.has_notstagged_header() | sl.has_untracked_header()))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think these should be && and || (logical operators) rather than & and | (bitwise operators).

Comment thread src/subcommand/status_subcommand.cpp Outdated
}
}

if (!sl.has_notstagged_header() & !sl.has_untracked_header())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Similar here.

Comment thread 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";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Is the repeat of "Ignored files:\n" intended here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

No, I'll remove one. I'll also comment it as it's not used so far.

ianthomas23 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks @SandrineP

ianthomas23 merged commit 6667003 into QuantStack:main Nov 10, 2025
1 check passed
SandrineP deleted the status_nothing_to_commit branch February 18, 2026 16:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL