Преглед на файлове

Catch SymrefLoop in set_if_equals

Previously `self.follow(name)` raised `KeyError` which was handled, but now it raises `SymrefLoop` the exception is passed up to the caller. With this patch the old behaviour is restored.
Dominic Davis-Foster преди 2 години
родител
ревизия
ecd78af07f
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      dulwich/refs.py

+ 1 - 1
dulwich/refs.py

@@ -835,7 +835,7 @@ class DiskRefsContainer(RefsContainer):
         try:
             realnames, _ = self.follow(name)
             realname = realnames[-1]
-        except (KeyError, IndexError):
+        except (KeyError, IndexError, SymrefLoop):
             realname = name
         filename = self.refpath(realname)