瀏覽代碼

Handle case that client does not send wanted refs.

Determine_wants can return empty dict if client
does not send wanted refs. Avoid stack trace.

Fixes #106

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Fabien Boucher 11 年之前
父節點
當前提交
d6410d6940
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      dulwich/repo.py

+ 1 - 1
dulwich/repo.py

@@ -896,7 +896,7 @@ class BaseRepo(object):
         :return: iterator over objects, with __len__ implemented
         """
         wants = determine_wants(self.get_refs())
-        if wants is None:
+        if not wants:
             # TODO(dborowitz): find a way to short-circuit that doesn't change
             # this interface.
             return None