Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Can't do a git pull on a simple repo which has incoming changes: non-fast-forward #889

@Skarlso

Description

@Skarlso

Hi.

So I have a repo in which I'm performing a pull like this:

...
			beforPull, _ := r.Head()
			tree, _ := r.Worktree()
			err = tree.Pull(&git.PullOptions{
				RemoteName: "origin",
			})
			if err != nil {
				gaia.Cfg.Logger.Error("error2 : ", err.Error())
				<-sem
				return
			}
...

There, error2 will say this: error2 : : non-fast-forward update=<unknown>.

But when I'm in the repo and try a pull or a git status that says the following:

❯ git status
On branch master
Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.

And indeed if I do a git pull it will work. So I'm expecting go-git to work the same way as git in this matter. But apparently it doesn't? I'm using almost the same as the example on Pull does. So... ? what's missing?

Note, the repo does have a binary in it which is untracked, but that shouldn't matter and removing it didn't change anything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions