Replies: 1 comment
-
This was fixed in 94cb156 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am working in a project where I have to simulate a local git instance and being able to push files to remote repositories in Azure, GitLab, BitBucket.
Working in OSX, Python 3.8 and installed dulwich=0.2.50. I have been trying to replicate this example: https://github.com/jelmer/dulwich/blob/master/examples/memoryrepo.py
..............................................................................................................
local_repo = MemoryRepo()
local_repo.refs.set_symbolic_ref(b'HEAD', b'refs/heads/master')
print(local_repo.refs.as_dict())
porcelain.fetch(local_repo, sys.argv[1])
local_repo['refs/heads/master'] = local_repo['refs/remotes/origin/master']
..............................................................................................................
Issues:
set_symbolic_ref() seems not having effect, since printing refs in next line returns {}, if I try to print refs after FETCH, it is empty yet (fetch is returning remote refs if I print it). Last line here is giving a KeyError since no refs in local repo, similar lines in this example is failing for same reason.
b'HEAD' does not exist in local repo.
Beta Was this translation helpful? Give feedback.
All reactions