Skip to content

Add -b flag to init subcommand#119

Merged
ianthomas23 merged 3 commits intoQuantStack:mainfrom
SandrineP:init_branch
Mar 13, 2026
Merged

Add -b flag to init subcommand#119
ianthomas23 merged 3 commits intoQuantStack:mainfrom
SandrineP:init_branch

Conversation

@SandrineP
Copy link
Collaborator

Add -b flag to init subcommand
Remove usage of git in tests

@SandrineP SandrineP force-pushed the init_branch branch 2 times, most recently from ecac100 to 1f1634f Compare March 13, 2026 10:21
@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

❌ Patch coverage is 95.45455% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.65%. Comparing base (372f1ef) to head (9cce149).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/subcommand/init_subcommand.cpp 93.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #119      +/-   ##
==========================================
- Coverage   87.69%   86.65%   -1.04%     
==========================================
  Files          60       60              
  Lines        2463     2481      +18     
  Branches      304      307       +3     
==========================================
- Hits         2160     2150      -10     
- Misses        303      331      +28     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

if (m_branch.empty())
{
auto repo = repository_wrapper::init(m_directory, m_bare);
path = repo.path();
Copy link
Member

Choose a reason for hiding this comment

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

This line is now that same here and in the else branch below, so it could be moved outside the end of the if-else.

Copy link
Collaborator Author

@SandrineP SandrineP Mar 13, 2026

Choose a reason for hiding this comment

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

It can't, because the repo doesn't exist outside of the if-else. I tried to change that using something like repository_wrapper repo = [this](){if-else}() but there was a problem with the init then.
I gave it anohter try and it seem to work.

Copy link
Member

@ianthomas23 ianthomas23 left a comment

Choose a reason for hiding this comment

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

OK, let's merge. Thanks @SandrineP

@ianthomas23 ianthomas23 merged commit 1ec65aa into QuantStack:main Mar 13, 2026
5 of 6 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.

2 participants