Index: owners.py |
diff --git a/owners.py b/owners.py |
index 78c7cca9cb7e6d9385fd954ce3512ce13ffd2da6..7773dbc38b6158005dc696cd14dc8c0ebb64bf8e 100644 |
--- a/owners.py |
+++ b/owners.py |
@@ -189,9 +189,11 @@ class Database(object): |
def load_data_needed_for(self, files): |
for f in files: |
+ loaded_dirs = set() |
dirpath = self.os_path.dirname(f) |
- while not self._owners_for(dirpath): |
+ while dirpath not in loaded_dirs: |
dtu
2016/08/31 02:35:46
Is loaded_dirs supposed to be at the top-level? I
|
self._read_owners(self.os_path.join(dirpath, 'OWNERS')) |
+ loaded_dirs.add(dirpath) |
if self._should_stop_looking(dirpath): |
break |
dirpath = self.os_path.dirname(dirpath) |