-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use git partial clone and worktree to reduce network/file io (#5412)
* Use git worktree and partial clone to reduce network io Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> * Add defer statement to clean up cloned git repositories in detector implementations Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> * Change the repo.Copy to use worktree and implement CopyToModify Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> * Add tests for Copy and CopyToModify methods in repo Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> * repo.Copy and related methods updated to use git.Worktree instead of git.Repo Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> * MockRepo.Copy method updated to return git.Worktree instead of git.Repo Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> * Update CopyToModify method to clone repository using git clone command Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> * Test: Update TestCopy to use repo.Copy instead of CopyToModify Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> * Fix comment in CopyToModify to clarify remote URL setting after local cloning Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> * Fetch the latest changes from remote after local cloning Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> * Remove .git directory from copied deploy source to avoid the git ops Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> * Update TestCopyToModify to use a mock remote directory for testing Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> * Copy deploy source using tar to exclude .git directory and improve performance Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]> --------- Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
- Loading branch information
Showing
13 changed files
with
203 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.