Explorar o código

Fix inconsistency in handling of trailing slashes.

Thanks to Jonas Haag for reporting. (#383)
Jelmer Vernooij %!s(int64=9) %!d(string=hai) anos
pai
achega
a3760ae977
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      dulwich/refs.py

+ 2 - 0
dulwich/refs.py

@@ -149,6 +149,8 @@ class RefsContainer(object):
         keys = self.keys(base)
         if base is None:
             base = b''
+        else:
+            base = base.rstrip(b'/')
         for key in keys:
             try:
                 ret[key] = self[(base + b'/' + key).strip(b'/')]