Skip to content

build: use clone instead of init for creating the builds commit changes#45975

Closed
josephperrott wants to merge 1 commit intoangular:mainfrom
josephperrott:clone-not-init
Closed

build: use clone instead of init for creating the builds commit changes#45975
josephperrott wants to merge 1 commit intoangular:mainfrom
josephperrott:clone-not-init

Conversation

@josephperrott
Copy link
Member

Rather than using git init to create an empty repo and then shallow fetch the
repo for a specific branch, we shallow clone the repository itself for the branch.
This prevents us from running into the issue of Github denying the push because it
comes from a shallow branch which does not map back to the repository.

Rather than using git init to create an empty repo and then shallow fetch the
repo for a specific branch, we shallow clone the repository itself for the branch.
This prevents us from running into the issue of Github denying the push because it
comes from a shallow branch which does not map back to the repository.
@josephperrott josephperrott added action: merge The PR is ready for merge by the caretaker area: build & ci Related the build and CI infrastructure of the project target: patch This PR is targeted for the next patch release labels May 12, 2022
@josephperrott josephperrott requested a review from devversion May 12, 2022 20:12
@ngbot ngbot bot modified the milestone: Backlog May 12, 2022

BUILD_REPO="${COMPONENT}-builds"
REPO_DIR="tmp/${BUILD_REPO}"
REPO_DIR="$(pwd)/tmp/${BUILD_REPO}"
Copy link
Member Author

Choose a reason for hiding this comment

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

It seems much safer to use an absolute path instead of relative path for referencing the directory?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, also a little more clear

Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

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

haha I think I remember that code

@jessicajaniuk
Copy link
Contributor

This PR was merged into the repository by commit 0db2841.

jessicajaniuk pushed a commit that referenced this pull request May 12, 2022
…es (#45975)

Rather than using git init to create an empty repo and then shallow fetch the
repo for a specific branch, we shallow clone the repository itself for the branch.
This prevents us from running into the issue of Github denying the push because it
comes from a shallow branch which does not map back to the repository.

PR Close #45975
jessicajaniuk pushed a commit that referenced this pull request May 12, 2022
…es (#45975)

Rather than using git init to create an empty repo and then shallow fetch the
repo for a specific branch, we shallow clone the repository itself for the branch.
This prevents us from running into the issue of Github denying the push because it
comes from a shallow branch which does not map back to the repository.

PR Close #45975
@josephperrott josephperrott deleted the clone-not-init branch May 12, 2022 21:00
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: build & ci Related the build and CI infrastructure of the project target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants