Setting repository HEAD using the tutorial does not work
Bug #610550 reported by
rtjmay
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Dulwich |
Fix Released
|
Low
|
Unassigned |
Bug Description
When setting HEAD after the first commit to a new repository, the sample code in the tutorial no longer works.
Trying the code from the tutorial:
>>> repo.refs[
>>> repo.refs['HEAD'] = 'ref: refs/heads/master'
>>> repo['HEAD']
Results in a KeyError and no refs being set. The commands must be reversed:
>>> repo.refs['HEAD'] = 'ref: refs/heads/master'
>>> repo.refs[
>>> repo['HEAD']
This correctly returns the commit id.
Changed in dulwich: | |
status: | Triaged → Fix Committed |
Changed in dulwich: | |
milestone: | 0.6.2 → 0.7.0 |
Changed in dulwich: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I can confirm that this is a bug, though we should fix the code rather than the tutorial.