[mercury]: Add comments#1232
Merged
Merged
Conversation
Signed-off-by: Xiaoyang Han <lux1an@qq.com>
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Signed-off-by: Xiaoyang Han <lux1an@qq.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces refactorings to streamline blob creation, enriches documentation, marks key structs as non-exhaustive for future extension, and updates dependencies.
- Replaced repeated manual
Blobconstruction withBlob::from_contentin diff and change logic - Added documentation comments and
#[non_exhaustive]attributes on several object types - Bumped
axumandbincodeversions and removed unused dependencies in Cargo.toml
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| scorpio/src/manager/diff.rs | Refactored manual Blob construction to Blob::from_content calls |
| scorpio/src/manager/commit.rs | Simplified new Tree creation using Tree::from_tree_items |
| scorpio/Cargo.toml | Updated axum to 0.8.4, bincode to 2.0.1; removed unused dependencies |
| mercury/src/internal/pack/encode.rs | Added doc comment linking to Git’s delta selection heuristics |
| mercury/src/internal/pack/cache.rs | Translated directory‐creation comment to English |
| mercury/src/internal/object/tree.rs | Added #[non_exhaustive] to Tree struct |
| mercury/src/internal/object/tag.rs | Added #[non_exhaustive] to Tag and clarified unsafe UTF-8 conversion comment |
| mercury/src/internal/object/commit.rs | Introduced format_message method and enhanced parent commit parsing comments |
| mercury/src/internal/object/blob.rs | Added #[non_exhaustive] to Blob and cleaned up test formatting |
Comments suppressed due to low confidence (2)
mercury/src/internal/object/commit.rs:126
- Add unit tests for
format_messageto verify its behavior on messages with and without PGP signatures.
pub fn format_message(&self) -> String {
mercury/src/internal/object/commit.rs:160
- [nitpick] The variable name
bindingis ambiguous; consider renaming it to something more descriptive likeremaining_dataorpost_tree_data.
let binding = commit[tree_end + 1..].to_vec(); // Move past the tree id
Signed-off-by: Han Xiaoyang <lux1an@qq.com>
Collaborator
Author
|
The dependency libraries for Scorpio have been updated. |
genedna
approved these changes
Jul 22, 2025
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.
No description provided.