Skip to content

Conversation

@Brend-Smits
Copy link
Member

@Brend-Smits Brend-Smits commented Mar 14, 2022

Motivation

On large repositories, the process often got stuck and failed for some reason. This was difficult to diagnose due to lack of logging.

Proposed Changes

Only checkout the HEAD^ instead of the whole repository, with the entire history, including all of its branches and their history.
Include more logging as well as a time out of 1 second if the process is finished but stuck closing. This timeout is only triggered when the Git process has been stuck for 1 second.

Test Plan

Test with bin/repolinter.js -g https://github.com/microsoft/vscode and see the progress being reported like:

git.clone resolving stage 91% complete
git.clone resolving stage 92% complete
git.clone resolving stage 93% complete
git.clone resolving stage 94% complete
git.clone resolving stage 95% complete
git.clone resolving stage 96% complete
git.clone resolving stage 97% complete
git.clone resolving stage 98% complete
git.clone resolving stage 99% complete
git.clone resolving stage 100% complete
git.clone resolving stage 100% complete

Signed-off-by: Brend Smits [email protected]

Updated simple-git depedency to version 3

Signed-off-by: Brend Smits <[email protected]>
@Brend-Smits Brend-Smits force-pushed the feature/improve-checkout branch from d9d9330 to 083dc82 Compare March 14, 2022 16:29
@Brend-Smits Brend-Smits changed the title Git clone now fetches only HEAD^ history Git clone now fetches only HEAD^ history and has a timeout Mar 14, 2022
@Brend-Smits
Copy link
Member Author

Seems that some tests are failing, I will dive into why this is happening after dinner tonight.

Copy link
Member

@JeroenKnoops JeroenKnoops left a comment

Choose a reason for hiding this comment

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

Awesome

Signed-off-by: Brend Smits <[email protected]>
@Brend-Smits Brend-Smits merged commit 9e4aa9f into master Mar 14, 2022
@Brend-Smits Brend-Smits deleted the feature/improve-checkout branch March 14, 2022 23:11
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