Skip to content

[mercury]:Annotations and minor refactoring of Git objects #1225

Merged
genedna merged 5 commits into
gitmono-dev:mainfrom
Ivanbeethoven:main
Jul 15, 2025
Merged

[mercury]:Annotations and minor refactoring of Git objects #1225
genedna merged 5 commits into
gitmono-dev:mainfrom
Ivanbeethoven:main

Conversation

@Ivanbeethoven

Copy link
Copy Markdown
Collaborator

No description provided.

@vercel

vercel Bot commented Jul 14, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mega ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 14, 2025 0:54am

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

Adds annotations, documentation, and minor refactorings around Git object types and model conversions.

  • Introduces From<mega_commit::Model> and From<git_commit::Model> conversions in the Commit type
  • Adds doc comments and cleans up constructors in Blob and SHA1 hashing
  • Removes duplicate model-to-Commit impls and tidies imports in the internal model layer

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
mercury/src/internal/object/commit.rs Added #[non_exhaustive], docs for from_tree_id, and From<…Model> impls
mercury/src/internal/object/blob.rs Added docs for from_content, removed dead code, and annotated hash calculation
mercury/src/internal/model/commit.rs Removed redundant From<…Model> impls and cleaned up import formatting
mercury/src/hash.rs Documented the from_type_and_data SHA1 construction algorithm
Comments suppressed due to low confidence (1)

mercury/src/hash.rs:105

  • [nitpick] This doc line uses non-standard punctuation and formatting, which can be confusing. Consider rewriting it with standard parentheses and clearer wording, e.g., Hash = “<type> <length>\0<content>”.
    ///  Hash compute <- {Object Type}+{ }+{Object Size(before compress)}+{\x00}+{Object Content(before compress)}

Comment thread mercury/src/internal/object/commit.rs Outdated
Comment thread mercury/src/internal/object/commit.rs Outdated
Comment thread mercury/src/internal/model/commit.rs Outdated
Comment thread mercury/src/internal/object/blob.rs Outdated
Signed-off-by: Han Xiaoyang <lux1an@qq.com>
@genedna
genedna added this pull request to the merge queue Jul 15, 2025
Merged via the queue into gitmono-dev:main with commit 212d8c2 Jul 15, 2025
19 of 20 checks passed
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.

3 participants