feat: support showing commits and logging #2
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.
feat: support showing commits and logging
Summary:
Create two new commands, "Sshow" and "Slog" they will run the sapling show and
log commands. All the output will be put info a buffer. This is all implemented
using the
BufReadCmd
auto command so it can be easily expanded.The show command will load the diff info a buffer with the details and
description at the top of the buffer in comments. The file will be a diff
filetype so its recommended to treesitter for nice diff highlighting
The log command will run
sl log
with your given ref and put the output in abuffer. Right how we are loading the raw output of the command in the buffer,
all highlighting is done with baleia. This will escape your ansi output and
provide the correct colors. This uses the default log command so the output can
be configured in sapling with
ui.logtemplate
Test Plan:
Right now there is no testing for this. I will in the future set this up in CI.
Because this project is very early I would like to have a bit more of a history
before we start using it for testing.