@@ -19,11 +19,11 @@ import (
1919type PrepareSourcesOptions struct {
2020 ComponentFilter components.ComponentFilter
2121
22- OutputDir string
23- SkipOverlays bool
24- WithGitRepo bool
25- Force bool
26- AllowNoHashes bool
22+ OutputDir string
23+ SkipOverlays bool
24+ WithoutGitRepo bool
25+ Force bool
26+ AllowNoHashes bool
2727}
2828
2929func prepareOnAppInit (_ * azldev.App , sourceCmd * cobra.Command ) {
@@ -68,8 +68,8 @@ Only one component may be selected at a time.`,
6868 _ = cmd .MarkFlagDirname ("output-dir" )
6969
7070 cmd .Flags ().BoolVar (& options .SkipOverlays , "skip-overlays" , false , "skip applying overlays to prepared sources" )
71- cmd .Flags ().BoolVar (& options .WithGitRepo , "with -git" , false ,
72- "Create a dist-git repository with synthetic commit history (requires a project git repository )" )
71+ cmd .Flags ().BoolVar (& options .WithoutGitRepo , "without -git" , false ,
72+ "Disable dist-git repository creation (enabled by default )" )
7373 cmd .Flags ().BoolVar (& options .Force , "force" , false , "delete and recreate the output directory if it already exists" )
7474 cmd .Flags ().BoolVar (& options .AllowNoHashes , "allow-no-hashes" , false ,
7575 "compute missing hashes by downloading source files from their origin" )
@@ -121,13 +121,13 @@ func PrepareComponentSources(env *azldev.Env, options *PrepareSourcesOptions) er
121121 return err
122122 }
123123
124- if options .SkipOverlays && options .WithGitRepo {
125- slog .Warn ("--with- git has no effect when --skip-overlays is set; " +
124+ if options .SkipOverlays && ! options .WithoutGitRepo {
125+ slog .Warn ("dist- git flow has no effect when ' --skip-overlays' is set; " +
126126 "synthetic history requires overlays to be applied" )
127127 }
128128
129129 var preparerOpts []sources.PreparerOption
130- if options .WithGitRepo {
130+ if ! options .WithoutGitRepo {
131131 preparerOpts = append (preparerOpts , sources .WithGitRepo (env , env .LockReader ()))
132132 }
133133
0 commit comments