-
Notifications
You must be signed in to change notification settings - Fork 535
Description
To reproduce:
- Clone any Github repository using
git
- Make a change to the repository on Github (not locally)
- Build the pull example
- Run the example with an argument which is the path to the cloned repository
I get this output:
git pull origin
error: reference has changed concurrently
After the above error occurs, running the command git pull
using my installed version of git
on the repo shows this:
error: cannot lock ref 'refs/remotes/origin/master': unable to resolve reference 'refs/remotes/origin/master': reference broken
If the repository is not updated on Github (so has nothing to pull), it runs successfully and returns already up-to-date
This is the full output if I change the code to send the progress tostdout
:
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Compressing objects: 100% (3/3), done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
error: reference has changed concurrently
Compared to the output of the actual git
command on my system:
C:\folder> git pull
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
Something seems to definitely be going wrong.
Versions:
- go-git.v4
- go version go1.13.1 windows/amd64
After some more testing I was doing the same thing with a different repository and it was giving me another error, worktree contains unstaged changes
.
This seems to be some sort of an incompatibility between the git
tool and the go-git
library, as cloning & pulling with just go-git
works, but cloning with git
and then pulling with go-git
does not seem to work.