Skip to content

Add source-build inner clone shallow repo support#6865

Merged
dagood merged 1 commit intodotnet:masterfrom
dagood:apsb-shallow-clone-compat
Jan 28, 2021
Merged

Add source-build inner clone shallow repo support#6865
dagood merged 1 commit intodotnet:masterfrom
dagood:apsb-shallow-clone-compat

Conversation

@dagood
Copy link
Copy Markdown
Member

@dagood dagood commented Jan 27, 2021

Fixes this issue:

  1. The repo builds in the standard managed-only arcade-specified source-build container.
    • mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-3e800f1-20190501005343, git version 1.8.3.1
  2. The Checkout CI step makes a shallow clone (--depth=3).
  3. The inner clone script tries to clone the outer repo into a subdirectory.
    • Git fails because it doesn't allow cloning from a shallow repo into another place.
    • fatal: attempt to fetch/clone from a shallow repository

Now the script detects .git/shallow and works around it.

I clarified the WIP copying log a little, and made sure it's disabled for CI builds because the git stash doesn't get copied over when we use the shallow clone workaround. (WIP changes (dirty working tree) are definitely not expected in CI builds, so this is probably a good change anyway.)

@dagood dagood merged commit aa450e5 into dotnet:master Jan 28, 2021
@dagood dagood deleted the apsb-shallow-clone-compat branch January 28, 2021 16:01
dagood added a commit to dagood/arcade that referenced this pull request Feb 2, 2021
dagood added a commit to dagood/arcade that referenced this pull request Feb 3, 2021
dagood added a commit to dagood/arcade that referenced this pull request Feb 3, 2021
akoeplinger pushed a commit to akoeplinger/arcade that referenced this pull request Apr 12, 2021
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.

2 participants