supporting private repos... again, removing go-git and deps

This commit is contained in:
zricethezav committed 2018-02-22 15:26:29 -06:00
1 parent 744ff2f876
commit b9657155b2
383 files changed
+2 -94490

No files matched your search

+2 -7
View File
@@ -12,7 +12,6 @@ import (
"strings"
"sync"
"syscall"
"gopkg.in/src-d/go-git.v4"
)
// LeakElem contains the line and commit of a leak
@@ -26,18 +25,14 @@ func start(opts *Options) {
c := make(chan os.Signal, 2)
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
repoName := getLocalRepoName(opts.RepoURL)
fmt.Printf("Cloning \x1b[37;1m%s\x1b[0m...\n", opts.RepoURL)
_, err := git.PlainClone(appRoot + "/" + repoName, false, &git.CloneOptions{
URL: opts.RepoURL,
RecurseSubmodules: git.DefaultSubmoduleRecursionDepth,
})
err := exec.Command("git", "clone", opts.RepoURL).Run()
if err != nil {
cleanup(repoName)
log.Printf("failed to clone repo %v", err)
return
}
fmt.Printf("Evaluating \x1b[37;1m%s\x1b[0m...\n", opts.RepoURL)
repoName := getLocalRepoName(opts.RepoURL)
if err = os.Chdir(repoName); err != nil {
log.Fatal(err)
}