fix: resolve cloning and merging issues in Libra module#1004
Merged
Conversation
…loning a repository. 2.Added tests for Git LFS and modified the container startup to use file mounting instead of file copying.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR resolves cloning and merging issues in the Libra module by correctly configuring the remote URL for cloning large file repositories, updating the LFS tests to use mounts instead of file copying, and adding fast-forward merge support for empty branches.
- Update test imports to include Mount and correct file operations.
- Fix typos in test comments and add fast-forward merge logic.
- Update clone command to ensure proper remote configuration.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| mega/tests/lfs_test.rs | Introduces Mount usage, fixes spelling mistakes in comments, and updates test timing. |
| libra/tests/mega_test.rs | Updates test container setup to use mounts instead of copy operations. |
| libra/src/command/merge.rs | Adds logic for handling fast-forward merges when merging into an empty branch. |
| libra/src/command/clone.rs | Moves remote URL configuration earlier in the setup process. |
…ightly delete the unused dir: libra/tests/common
Remove test/non-test conditional compilation in db.rs; keep only test code
genedna
approved these changes
May 6, 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.
1.clone 仓库时正确设置远程url,否则对大文件仓库克隆失败
2.增加对应的 libra 大文件测试,push 和 clone;并修改镜像启动时采用挂载,而不是复制文件
3.merge 分支时,如果当前分支为空,就直接合并分支。比如初始化一个空仓库,然后pull远程分支