client fetch errors when remote repo is empty

Bug #1060462 reported by milki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Dulwich
Fix Released
Medium
milki

Bug Description

If a remote git repo is empty (newly created with git init --bare), when dulwich.client tries to fetch from the repo, _read_refs will error.

Examples:

https://gist.github.com/3823386

This happens because _read_refs does not enter the for loop where it will set server_capabilities to something not None and set(None) errors.

_read_refs should return something sane in this case and dependents should handle this case.

Revision history for this message
milki (milki-p) wrote :
Jelmer Vernooij (jelmer)
Changed in dulwich:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
milki (milki-p) wrote :

Change read_refs to return None, set([]) and check for this in send_pack

Note: This doesn't patch the http client

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Merged, thanks!

Changed in dulwich:
status: Triaged → Fix Committed
assignee: nobody → milki (milki-p)
Jelmer Vernooij (jelmer)
Changed in dulwich:
milestone: none → 0.9.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.