Add --reverse flag to history command#225
Merged
esmuellert merged 2 commits intoesmuellert:mainfrom Feb 5, 2026
Merged
Conversation
Add --reverse (and -r) flag to :CodeDiff history command to show commits in chronological order (oldest first) instead of reverse chronological. - Create reusable flag parser in lua/codediff/core/args.lua - Add flag completion support for --reverse and -r - Update documentation with usage examples - Add comprehensive unit tests (9/9 passing) - Maintain backward compatibility
Owner
|
Thanks, I added the dynamic test file detection so we don't need to manually add new spec files every time, and bump the version before merge it |
f1569cb to
a913be8
Compare
Replace hardcoded SPEC_FILES array with find-based auto-discovery to ensure new test files are automatically included in the test runner.
a913be8 to
fd4ba1b
Compare
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why?
When reviewing commit history, it's often useful to see commits in chronological order (oldest first) rather than reverse chronological order. This is particularly helpful when:
This also mimics the order in which how GitHub presents per-commit review.
What?
--reverse(and-rshort form) flag to:CodeDiff historycommandlua/codediff/core/args.luafor extensibilityNotes
The git layer already supported
opts.reverse- this PR exposes that functionality through a command interface. The flag parser architecture makes it easy to add future flags (e.g.,--author,--since) to any command.