-
Notifications
You must be signed in to change notification settings - Fork 845
Open
Labels
Description
Bug Description
PlainClone uses an enormous amount of memory, consuming many times more RAM than a given repo even takes up on disk.
For a large Git repo (private, but can be easily replicated by cloning a public git repo like https://github.com/facebook/react/) that takes up 750MB on disk, go-git consumes nearly 3GB of RAM PlainClone.
go-git Version
HEAD of main 3c570d2
Steps to Reproduce
tmpDir, _ := os.MkdirTemp("", "clone-test")
cloneOptions := &git.CloneOptions{
URL: gitURL,
Progress: os.Stdout,
}
git.PlainCloneContext(context.Background(), tmpDir, cloneOptions)
os.RemoveAll(tmpDir)Additional Information
(screenshots are not from the same run)
Richard87