Переглянути джерело

If a string is passed in BaseRepo.get_walker we turn it into a one item list instead of iterating over the string itself

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Alberto Ruiz 11 роки тому
батько
коміт
910504656d
1 змінених файлів з 2 додано та 0 видалено
  1. 2 0
      dulwich/repo.py

+ 2 - 0
dulwich/repo.py

@@ -1081,6 +1081,8 @@ class BaseRepo(object):
         from dulwich.walk import Walker
         if include is None:
             include = [self.head()]
+        if isinstance(include, str):
+            include = [include]
         return Walker(self.object_store, include, *args, **kwargs)
 
     def revision_history(self, head):