feat: invert --with-git to --without-git for comp build and prepare-sources#162
Closed
feat: invert --with-git to --without-git for comp build and prepare-sources#162
Conversation
…ources Agent-Logs-Url: https://github.com/microsoft/azure-linux-dev-tools/sessions/6689b317-ce84-44ce-ad2b-e4d317bd6dbe Co-authored-by: dmcilvaney <23200982+dmcilvaney@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Invert --with-git flag to --without-git for source build
feat: invert --with-git to --without-git for comp build and prepare-sources
May 6, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR makes the dist-git source preparation flow the default for azldev component build and azldev component prepare-sources by inverting the CLI flag from --with-git to --without-git, aligning behavior with azldev component render.
Changes:
- Renames option fields and flags from
WithGitRepo/--with-gittoWithoutGitRepo/--without-gitand inverts the runtime logic. - Updates warning behavior when
--skip-overlaysis used under the dist-git flow. - Regenerates CLI reference docs and updates tests to validate the new flag and ensure the legacy flag is absent.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/app/azldev/cmds/component/preparesources.go | Invert dist-git toggle and warning logic for prepare-sources. |
| internal/app/azldev/cmds/component/build.go | Invert dist-git toggle for component build. |
| internal/app/azldev/cmds/component/preparesources_test.go | Updates tests to assert new flag registration and absence of legacy flag. |
| internal/app/azldev/cmds/component/build_test.go | Updates tests to assert new flag registration and absence of legacy flag. |
| docs/user/reference/cli/azldev_component_prepare-sources.md | Regenerates CLI docs reflecting --without-git. |
| docs/user/reference/cli/azldev_component_build.md | Regenerates CLI docs reflecting --without-git. |
Comment on lines
+134
to
+135
| cmd.Flags().BoolVar(&options.WithoutGitRepo, "without-git", false, | ||
| "Skip creating a dist-git repository with synthetic commit history") |
Comment on lines
+125
to
126
| slog.Warn("dist-git flow has no effect when '--skip-overlays' is set; " + | ||
| "synthetic history requires overlays to be applied") |
| cmd.Flags().BoolVar(&options.WithGitRepo, "with-git", false, | ||
| "Create a dist-git repository with synthetic commit history (requires a project git repository)") | ||
| cmd.Flags().BoolVar(&options.WithoutGitRepo, "without-git", false, | ||
| "Skip creating a dist-git repository with synthetic commit history") |
Contributor
|
superseded by #164 |
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 buildandazldev component prepare-sourcesdefaulted to the legacy source prep flow, whileazldev component renderalways 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(defaultfalse= dist-git on by default). Condition logic inverted accordingly.--skip-overlaysis set and--without-gitis not (i.e., git flow is enabled but will have no effect).preparesources_test.go,build_test.go): assert--without-gitis registered with defaultfalse; assert legacy--with-gitdoes not exist.mage docs.Before / After
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
dario.cat/home/REDACTED/.cache/go-build/7b/7be0cdfd4e5e66df21672375347bd23e46040e0c601b55d1ed8bef64f03acd06-d/go-licenses /home/REDACTED/.cache/go-build/7b/7be0cdfd4e5e66df21672375347bd23e46040e0c601b55d1ed8bef64f03acd06-d/go-licenses report --ignore golang.org/x --ignore github.com/microsoft/azure-linux-dev-tools ./... ux-amd64/pkg/tool/linux_amd64/vet provider.go GOMOD GOMODCACHE ux-amd64/pkg/tool/linux_amd64/vet env -json GO111MODULE ux-amd64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ux-amd64/pkg/tool/linux_amd64/vet(dns block)example.com/tmp/go-build1685468948/b666/sourceproviders.test /tmp/go-build1685468948/b666/sourceproviders.test -test.testlogfile=/tmp/go-build1685468948/b666/testlog.txt -test.paniconexit0 -test.timeout=10m0s go1.25.6 -c=4 -nolocalimports -importcfg /tmp/go-build1685468948/b585/importcfg -pack /home/REDACTED/work/azure-linux-dev-tools/azure-linux-dev-tools/internal/app/azldev/cmds/component/add.go VFhAWUIJBRpS -qui�� VvaAEw8uD /tmp/go-build240-ifaceassert ux-amd64/pkg/tool/linux_amd64/vet . o x86_64-linux-gnu-bool ux-amd64/pkg/too-buildtags(dns block)/tmp/go-build259055312/b001/sourceproviders.test /tmp/go-build259055312/b001/sourceproviders.test -test.testlogfile=/tmp/go-build259055312/b001/testlog.txt -test.paniconexit0 -test.timeout=10m0s /tmp/go-build1685468948/b851/vet.cfg ry/retry_test.go zUBtsJhar ux-amd64/pkg/tool/linux_amd64/compile 5468948/b114/ -dev-tools/inter-o mpile ux-amd64/pkg/too-trimpath ortc�� wPWbfYyV0 .cfg ux-amd64/pkg/tool/linux_amd64/compile 5468948/b114/ 5468948/b292/ mpile ux-amd64/pkg/too-buildtags(dns block)go.opentelemetry.io/home/REDACTED/.cache/go-build/7b/7be0cdfd4e5e66df21672375347bd23e46040e0c601b55d1ed8bef64f03acd06-d/go-licenses /home/REDACTED/.cache/go-build/7b/7be0cdfd4e5e66df21672375347bd23e46040e0c601b55d1ed8bef64f03acd06-d/go-licenses report --ignore golang.org/x --ignore github.com/microsoft/azure-linux-dev-tools ./... ux-amd64/pkg/tool/linux_amd64/vet provider.go GOMOD GOMODCACHE ux-amd64/pkg/tool/linux_amd64/vet env -json GO111MODULE ux-amd64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ux-amd64/pkg/tool/linux_amd64/vet(dns block)go.szostok.io/home/REDACTED/.cache/go-build/7b/7be0cdfd4e5e66df21672375347bd23e46040e0c601b55d1ed8bef64f03acd06-d/go-licenses /home/REDACTED/.cache/go-build/7b/7be0cdfd4e5e66df21672375347bd23e46040e0c601b55d1ed8bef64f03acd06-d/go-licenses report --ignore golang.org/x --ignore github.com/microsoft/azure-linux-dev-tools ./... ux-amd64/pkg/tool/linux_amd64/vet provider.go GOMOD GOMODCACHE ux-amd64/pkg/tool/linux_amd64/vet env -json GO111MODULE ux-amd64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ux-amd64/pkg/tool/linux_amd64/vet(dns block)go.uber.org/home/REDACTED/.cache/go-build/7b/7be0cdfd4e5e66df21672375347bd23e46040e0c601b55d1ed8bef64f03acd06-d/go-licenses /home/REDACTED/.cache/go-build/7b/7be0cdfd4e5e66df21672375347bd23e46040e0c601b55d1ed8bef64f03acd06-d/go-licenses report --ignore golang.org/x --ignore github.com/microsoft/azure-linux-dev-tools ./... ux-amd64/pkg/tool/linux_amd64/vet provider.go GOMOD GOMODCACHE ux-amd64/pkg/tool/linux_amd64/vet env -json GO111MODULE ux-amd64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ux-amd64/pkg/tool/linux_amd64/vet(dns block)go.yaml.in/home/REDACTED/.cache/go-build/7b/7be0cdfd4e5e66df21672375347bd23e46040e0c601b55d1ed8bef64f03acd06-d/go-licenses /home/REDACTED/.cache/go-build/7b/7be0cdfd4e5e66df21672375347bd23e46040e0c601b55d1ed8bef64f03acd06-d/go-licenses report --ignore golang.org/x --ignore github.com/microsoft/azure-linux-dev-tools ./... ux-amd64/pkg/tool/linux_amd64/vet provider.go GOMOD GOMODCACHE ux-amd64/pkg/tool/linux_amd64/vet env -json GO111MODULE ux-amd64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ux-amd64/pkg/tool/linux_amd64/vet(dns block)gopkg.in/home/REDACTED/.cache/go-build/7b/7be0cdfd4e5e66df21672375347bd23e46040e0c601b55d1ed8bef64f03acd06-d/go-licenses /home/REDACTED/.cache/go-build/7b/7be0cdfd4e5e66df21672375347bd23e46040e0c601b55d1ed8bef64f03acd06-d/go-licenses report --ignore golang.org/x --ignore github.com/microsoft/azure-linux-dev-tools ./... ux-amd64/pkg/tool/linux_amd64/vet provider.go GOMOD GOMODCACHE ux-amd64/pkg/tool/linux_amd64/vet env -json GO111MODULE ux-amd64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ux-amd64/pkg/tool/linux_amd64/vet(dns block)invalid-domain.there.is.no.such.resource/tmp/go-build1685468948/b659/rpmprovider.test /tmp/go-build1685468948/b659/rpmprovider.test -test.testlogfile=/tmp/go-build1685468948/b659/testlog.txt -test.paniconexit0 -test.timeout=10m0s go1.25.6 -c=4 -nolocalimports -importcfg /tmp/go-build1685468948/b576/importcfg -pack /home/REDACTED/work/azure-linux-dev-tools/azure-linux-dev-tools/internal/app/azldev/core/testutils/cobrautils.go 8sd-sVnQMlmS -W go-crypto@v1.1.6-errorsas /tmp/go-build240-ifaceassert ux-amd64/pkg/tool/linux_amd64/vet . e/internal/gopat-atomic --64 ux-amd64/pkg/too-buildtags(dns block)If you need me to access, download, or install something from one of these locations, you can either: