Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow shallow clones for local workspaces #14312

Merged
merged 7 commits into from
Nov 1, 2023
Merged

Allow shallow clones for local workspaces #14312

merged 7 commits into from
Nov 1, 2023

Conversation

blampe
Copy link
Contributor

@blampe blampe commented Oct 23, 2023

Description

This exposes a GitRepo option to enable shallow cloning repositories. This is helpful in cases where the repo has a large history.

Checklist

  • I have run make tidy to update any new dependencies
  • I have run make lint to verify my code passes the lint check
    • I have formatted my code using gofumpt
  • I have added tests that prove my fix is effective or that my feature works
  • I have run make changelog and committed the changelog/pending/<file> documenting my change
  • Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version

@pulumi-bot
Copy link
Contributor

pulumi-bot commented Oct 23, 2023

Changelog

[uncommitted] (2023-11-01)

Features

  • [auto] Allow shallow repository clones in NewLocalWorkspace
    #14312

Copy link
Collaborator

@tgummerer tgummerer left a comment

Choose a reason for hiding this comment

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

Makes sense to me. It looks like we're always cloning a repo, and never fetching into it, in which case shallow clones make perfect sense.

Copy link
Member

@justinvp justinvp left a comment

Choose a reason for hiding this comment

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

Mind adding a test? Otherwise LGTM

@blampe
Copy link
Contributor Author

blampe commented Oct 24, 2023

Mind adding a test? Otherwise LGTM

Good call, there was a bug in go-git (maybe go-git/go-git#305) that was fixed by upgrading.

@komalali
Copy link
Member

Heyo, would love to get this fixed up and merged. I hope it doesn't fall through the cracks!

@blampe blampe enabled auto-merge November 1, 2023 16:50
@blampe blampe added this pull request to the merge queue Nov 1, 2023
Merged via the queue into master with commit cbcad32 Nov 1, 2023
44 checks passed
@blampe blampe deleted the shallow-workspace branch November 1, 2023 18:38
@justinvp justinvp mentioned this pull request Nov 2, 2023
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.

None yet

5 participants