Skip to content

fix(render): Scrub submodules from distgits#137

Merged
dmcilvaney merged 3 commits intomicrosoft:mainfrom
dmcilvaney:damcilva/fix_prep_src_git_submodules
Apr 30, 2026
Merged

fix(render): Scrub submodules from distgits#137
dmcilvaney merged 3 commits intomicrosoft:mainfrom
dmcilvaney:damcilva/fix_prep_src_git_submodules

Conversation

@dmcilvaney
Copy link
Copy Markdown
Contributor

Various git operations get confused when there are orphaned git submodules in the distgit, scrub them out.

Copilot AI review requested due to automatic review settings April 30, 2026 17:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR aims to prevent go-git operations from failing when dist-git repositories contain orphaned/bogus submodule (“gitlink”) entries by scrubbing those entries from the git index before staging/committing.

Changes:

  • Add removeSubmoduleEntries to strip 160000 (submodule) entries from the index and delete corresponding directories.
  • Invoke submodule scrubbing during synthetic-history preparation.
  • Add unit tests covering submodule stripping and no-op cases.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
internal/app/azldev/core/sources/sourceprep.go Adds and wires in index-scrubbing logic for submodule (gitlink) entries before staging.
internal/app/azldev/core/sources/sourceprep_internal_test.go Adds tests validating index scrubbing and directory cleanup behavior.

Comment thread internal/app/azldev/core/sources/sourceprep.go Outdated
Comment thread internal/app/azldev/core/sources/sourceprep.go Outdated
Comment thread internal/app/azldev/core/sources/sourceprep_internal_test.go Outdated
Comment thread internal/app/azldev/core/sources/sourceprep_internal_test.go Outdated
Comment thread internal/app/azldev/core/sources/sourceprep_internal_test.go Outdated
@dmcilvaney dmcilvaney force-pushed the damcilva/fix_prep_src_git_submodules branch from e5ae5c2 to a5e3a2d Compare April 30, 2026 20:59
Co-authored-by: Copilot <copilot@github.com>
Copilot AI review requested due to automatic review settings April 30, 2026 21:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread internal/app/azldev/core/sources/sourceprep_internal_test.go
Comment thread internal/app/azldev/core/sources/sourceprep_internal_test.go
Copy link
Copy Markdown
Member

@reubeno reubeno left a comment

Choose a reason for hiding this comment

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

One comment.

Comment thread internal/app/azldev/core/sources/sourceprep.go Outdated
@dmcilvaney dmcilvaney merged commit efb37a3 into microsoft:main Apr 30, 2026
15 checks passed
@dmcilvaney dmcilvaney deleted the damcilva/fix_prep_src_git_submodules branch April 30, 2026 23:22
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.

3 participants