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

Add reference repo for git clone openj9 #3892

Merged
merged 1 commit into from
Jul 28, 2022
Merged

Conversation

llxia
Copy link
Contributor

@llxia llxia commented Jul 27, 2022

related: runtimes/backlog/issues/815

Signed-off-by: lanxia lan_xia@ca.ibm.com

Signed-off-by: lanxia <lan_xia@ca.ibm.com>
@llxia
Copy link
Contributor Author

llxia commented Jul 27, 2022

[2022-07-27T15:07:07.944Z] git clone --depth 1 --reference-if-able /home/jenkins/openjdk_cache -b master https://github.com/eclipse/openj9.git
[2022-07-27T15:07:07.944Z] Cloning into 'openj9'...
[2022-07-27T15:07:07.944Z] info: Could not add alternate for '/home/jenkins/openjdk_cache': reference repository '/home/jenkins/openjdk_cache' is not a local repository.
[2022-07-27T15:07:16.833Z] Updating files:  96% (9714/10083)
Updating files:  97% (9781/10083)
Updating files:  98% (9882/10083)
Updating files:  99% (9983/10083)
Updating files: 100% (10083/10083)
Updating files: 100% (10083/10083), done.
[2022-07-27T15:07:16.833Z] check OpenJ9 Repo sha
  • cache exists and is up to date: Grinder/26236
[2022-07-27T15:20:03.267Z] git clone --depth 1 --reference-if-able /home/jenkins/openjdk_cache -b master https://github.com/eclipse-openj9/openj9.git
[2022-07-27T15:20:03.267Z] Cloning into 'openj9'...
[2022-07-27T15:20:09.528Z] Checking out files:  43% (4393/10083)   
Checking out files:  44% (4437/10083)   
Checking out files:  45% (4538/10083)   
...
Checking out files: 100% (10083/10083), done.
[2022-07-27T15:20:09.528Z] check OpenJ9 Repo sha

@llxia llxia marked this pull request as ready for review July 27, 2022 17:32
@llxia
Copy link
Contributor Author

llxia commented Jul 27, 2022

Further simplification will be done in #3828

@llxia llxia requested review from renfeiw and smlambert July 27, 2022 17:33
Copy link
Contributor

@renfeiw renfeiw left a comment

Choose a reason for hiding this comment

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

LGTM

@karianna
Copy link
Contributor

might be worth adding a comment as to why this is being added.

@llxia
Copy link
Contributor Author

llxia commented Jul 28, 2022

might be worth adding a comment as to why this is being added.

This is to improve the git clone efficiency.

Using an already existing repository as an alternate will require fewer objects to be copied from the repository being cloned, reducing network and local storage costs. When using the --reference-if-able, a non existing directory is skipped with a warning instead of aborting the clone.

https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---reference-if-ableltrepositorygt

@smlambert smlambert merged commit f59dc40 into adoptium:master Jul 28, 2022
@AdamBrousseau
Copy link
Contributor

Came back to this looking for this info so I'll add it here.

The --reference-if-able needs git >= 2.11.4

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