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

feat: double clone against AzDo to reduce libgit2 memory footprint #7941

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions backend/plugins/gitextractor/gitextractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func main() {
useGoGit := cmd.Flags().BoolP("useGoGit", "g", false, "use go-git instead of libgit2")
skipCommitStat := cmd.Flags().BoolP("skipCommitStat", "S", false, "")
skipCommitFiles := cmd.Flags().BoolP("skipCommitFiles", "F", true, "")
noShallowClone := cmd.Flags().BoolP("noShallowClone", "A", false, "")
timeAfter := cmd.Flags().StringP("timeAfter", "a", "", "collect data that are created after specified time, ie 2006-01-02T15:04:05Z")
_ = cmd.MarkFlagRequired("url")
_ = cmd.MarkFlagRequired("repoId")
Expand All @@ -54,6 +55,7 @@ func main() {
"useGoGit": *useGoGit,
"skipCommitStat": skipCommitStat,
"skipCommitFiles": skipCommitFiles,
"noShallowClone": noShallowClone,
}, *timeAfter)
}
runner.RunCmd(cmd)
Expand Down
4 changes: 2 additions & 2 deletions backend/plugins/gitextractor/parser/clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ package parser

import (
"github.com/apache/incubator-devlake/core/errors"
"github.com/apache/incubator-devlake/core/plugin"
)

type RepoCloner interface {
CloneRepo(ctx plugin.SubTaskContext, localDir string) errors.Error
CloneRepo() errors.Error
CloseRepo() errors.Error
}
Loading
Loading