Add --abbrev-commit, --format=oneline and --oneline to the log subcommand#118
Add --abbrev-commit, --format=oneline and --oneline to the log subcommand#118SandrineP wants to merge 1 commit intoQuantStack:mainfrom
--abbrev-commit, --format=oneline and --oneline to the log subcommand#118Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #118 +/- ##
==========================================
+ Coverage 86.83% 87.02% +0.19%
==========================================
Files 60 60
Lines 2340 2382 +42
Branches 275 287 +12
==========================================
+ Hits 2032 2073 +41
- Misses 308 309 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ianthomas23
left a comment
There was a problem hiding this comment.
Just one change requested, and a note about future work.
| auto *sub = app.add_subcommand("log", "Shows commit logs"); | ||
|
|
||
| sub->add_flag("--format", m_format_flag, "Pretty-print the contents of the commit logs in a given format, where <format> can be one of full and fuller"); | ||
| sub->add_option("--format", m_format_flag, "Pretty-print the contents of the commit logs in a given format, where <format> can be one of full and fuller"); |
There was a problem hiding this comment.
This should mention oneline as an option.
| std::cout << std::boolalpha << repo.is_shallow() << std::endl; | ||
| } | ||
| } | ||
| return; |
There was a problem hiding this comment.
git allows the user to specify both flags and revisions in one command, and outputs lines in order. With this return if you specify both in git2cpp you only see the results for the flags. It is OK if this is future work though, as keeping the order of both flags and revision arguments will take effort.
There was a problem hiding this comment.
Thanks ! I only thought about the two flags, which is what I tested. I'll update it !
Fix #91
Add
--abbrev-commit,format=onelineand--onelineto thelogsubcommandAdd
<rev>to therevparsesubcommandAdd
-annotateto thetagsubcommand(The last two ones being useful for the tests)