Skip to content

feat: blobless clone#92

Merged
leander-dsouza merged 7 commits intoros-infrastructure:mainfrom
Owen-Liuyuxuan:feat/blobless_clone
Mar 4, 2026
Merged

feat: blobless clone#92
leander-dsouza merged 7 commits intoros-infrastructure:mainfrom
Owen-Liuyuxuan:feat/blobless_clone

Conversation

@Owen-Liuyuxuan
Copy link
Contributor

@Owen-Liuyuxuan Owen-Liuyuxuan commented Dec 17, 2025

Basic Info

Info Please fill out this column
Ticket(s) this addresses resolves #91;
Primary OS tested on Ubuntu
Is this a breaking change? No
Does this PR contain AI generated software? No;

Description of contribution in a few bullet points

  • For vcs import, add an optional argument blobless-clone
  • In git import:
    • If there is no existing repository, it will perform a blobless clone, then require a follow-up checkout.
    • If there is an existing repository, it will perform fetch with the blobless option.

Related Links:

dirk-thomas/vcstool#283

Description of how this change was tested

  • run precommit before committing.
  • existing test passed.

Based on the current autoware repos, I run the following commands:
image

The resulting directory will have a size difference like this, but all required contents exist:
image

Signed-off-by: YuxuanLiuTier4Desktop <619684051@qq.com>
Copy link
Member

@leander-dsouza leander-dsouza left a comment

Choose a reason for hiding this comment

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

This is amazing :)
Thank you for raising the issue and proposing a valid solution 🎉

I would suggest adding a couple of tests for robustness, namely:

  • test_import_blobless
  • test_import_blobless_shallow_mutually_exclusive

PS. Since the repository uses local paths for tests, you would get the following warning while running --blobless-clone:

warning: filtering not recognized by server, ignoring

Feel free to include this warning as well in the expected file - import_blobless.txt.

@leander-dsouza leander-dsouza added the enhancement New feature or request label Feb 21, 2026
Signed-off-by: Yuxuan Liu <619684051@qq.com>
Signed-off-by: Yuxuan Liu <619684051@qq.com>
Signed-off-by: Yuxuan Liu <619684051@qq.com>
Signed-off-by: Yuxuan Liu <619684051@qq.com>
Signed-off-by: Yuxuan Liu <619684051@qq.com>
@Owen-Liuyuxuan
Copy link
Contributor Author

Owen-Liuyuxuan commented Feb 24, 2026

@leander-dsouza Thanks for the thorough review. I added the fixes required.

For the test,

  • python3 -m unittest test.test_commands.TestCommands.test_import_blobless test.test_commands.TestCommands.test_import_blobless_shallow_mutually_exclusive Locally test passed.
  • I used AI to generate the test codes.
    • The test content looks legit.
    • Warning were originally fixed in the codes -- I prompted AI to transfer the warning texts into the "expected outputs" as required by the review.

Signed-off-by: Yuxuan Liu <619684051@qq.com>
@Owen-Liuyuxuan
Copy link
Contributor Author

@leander-dsouza Thanks for the great suggestion. In 0f3d044, I followed your suggestion and use exlusive group.

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 6.66667% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 26.82%. Comparing base (a9022f0) to head (0f3d044).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
vcs2l/clients/git.py 0.00% 10 Missing ⚠️
vcs2l/commands/import_.py 20.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #92      +/-   ##
==========================================
- Coverage   26.96%   26.82%   -0.14%     
==========================================
  Files          31       31              
  Lines        2240     2255      +15     
  Branches      393      397       +4     
==========================================
+ Hits          604      605       +1     
- Misses       1576     1590      +14     
  Partials       60       60              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@leander-dsouza leander-dsouza left a comment

Choose a reason for hiding this comment

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

LGTM! 🎉
Thank you for the prompt fixes :)

@leander-dsouza leander-dsouza merged commit e8f0811 into ros-infrastructure:main Mar 4, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Blobless Clone

3 participants