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

breakfix: empty git-upload-pack given #2

Closed
greenpau opened this issue Jan 12, 2022 · 1 comment
Closed

breakfix: empty git-upload-pack given #2

greenpau opened this issue Jan 12, 2022 · 1 comment

Comments

@greenpau
Copy link
Owner

Receiving the following error when pulling an existing repo:

run: loading initial config: loading new config: loading git app module: provision git: empty git-upload-pack given

The error is being triggered invoking Pull() function:

// Pull the repository.
repoDir, err = filepath.Abs(repoDir)
if err != nil {
return err
}
repo, err := git.PlainOpen(repoDir)
if err != nil {
return err
}
// w, err := repo.Worktree()
_, err = repo.Worktree()
if err != nil {
return err
}
/*
opts := &git.PullOptions{
RemoteName: "origin",
SingleBranch: true,
}
if r.Config.Branch != "" {
opts.ReferenceName = plumbing.NewBranchReferenceName(r.Config.Branch)
}
if r.Config.Depth > 0 {
opts.Depth = r.Config.Depth
}
if err := w.Pull(opts); err != nil {
if err == git.NoErrAlreadyUpToDate {
return nil
}
return err
}
ref, err := repo.Head()
if err != nil {
return err
}

@greenpau
Copy link
Owner Author

Waiting on go-git/go-git#447 to get resolved.

@greenpau greenpau mentioned this issue Jan 12, 2022
greenpau added a commit that referenced this issue Jan 13, 2022
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

No branches or pull requests

1 participant