diff --git a/bundle/config/mutator/load_git_details.go b/bundle/config/mutator/load_git_details.go index 5d447f968..02332bf5b 100644 --- a/bundle/config/mutator/load_git_details.go +++ b/bundle/config/mutator/load_git_details.go @@ -22,6 +22,8 @@ func (m *loadGitDetails) Name() string { } func (m *loadGitDetails) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnostics { + fmt.Printf("running loadGitDetails config=%v\n", b.Config.Bundle.Git) + var diags diag.Diagnostics info, err := git.FetchRepositoryInfo(ctx, b.BundleRoot.Native(), b.WorkspaceClient()) if err != nil { @@ -38,7 +40,10 @@ func (m *loadGitDetails) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagn config.ActualBranch = info.CurrentBranch if config.Branch == "" && info.CurrentBranch != "" { + fmt.Printf("setting inferred config=%v info=%v\n", *config, info) config.Inferred = true + } else { + fmt.Printf("NOT setting inferred config=%v info=%v\n", *config, info) } // The value from config takes precedence; however, we always warn if configValue and fetchedValue disagree. @@ -59,6 +64,7 @@ func (m *loadGitDetails) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagn } func checkMatch(field, fetchedValue string, configValue *string, allowedToMismatch bool) []diag.Diagnostic { + fmt.Printf("checkMatch %s %s %s %v\n", field, fetchedValue, *configValue, allowedToMismatch) if fetchedValue == "" { return nil }