refactor: invert --with-git to --without-git for comp build and prepare-sources#164
Merged
reubeno merged 1 commit intomicrosoft:mainfrom May 7, 2026
Conversation
3b93ac5 to
26d0050
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR flips azldev component build and azldev component prepare-sources from an opt-in dist-git/synthetic-history flow (--with-git) to a default-on flow with an opt-out flag (--without-git), aligning them with azldev component render behavior.
Changes:
- Renamed options
WithGitRepo→WithoutGitRepoand renamed CLI flag--with-git→--without-gitforcomponent buildandcomponent prepare-sources, inverting the enabling logic. - Updated flag registration tests to assert the new flag exists (default
false) and the legacy flag does not exist. - Updated scenario test project creation to initialize a git repo for templated projects where synthetic history is required.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
internal/app/azldev/cmds/component/preparesources.go |
Renames/inverts git-flow flag and updates warning/option wiring for dist-git source prep. |
internal/app/azldev/cmds/component/preparesources_test.go |
Verifies --without-git flag registration/defaults and absence of --with-git. |
internal/app/azldev/cmds/component/build.go |
Renames/inverts git-flow flag and updates source preparer options accordingly. |
internal/app/azldev/cmds/component/build_test.go |
Verifies --without-git flag registration/defaults and absence of --with-git. |
scenario/internal/projecttest/templatetestproject.go |
Adds an option to initialize templated test projects as git repos with an initial commit. |
scenario/component_build_test.go |
Ensures scenario build tests create projects initialized as git repos to support default dist-git behavior. |
26d0050 to
f9c020c
Compare
reubeno
approved these changes
May 7, 2026
dmcilvaney
approved these changes
May 7, 2026
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.
azldev component build and azldev component prepare-sources defaulted to the legacy source prep flow, while azldev component render always used the dist-git flow with synthetic commit history. This inverts the default so all three commands are consistent.
Changes
preparesources.go / build.go: WithGitRepo bool → WithoutGitRepo bool; flag renamed --with-git → --without-git (default false = dist-git on by default). Condition logic inverted accordingly.
Warning message updated: fires when --skip-overlays is set and --without-git is not (i.e., git flow is enabled but will have no effect).
Tests (preparesources_test.go, build_test.go): assert --without-git is registered with default false; assert legacy --with-git does not exist.
CLI docs regenerated via mage docs.
Before / After