Skip to content

Commit 86fedaf

Browse files
committed
fix: ignore deleted paths in generated entities
closes #806
1 parent 4f80efc commit 86fedaf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

renku/core/models/provenance/activities.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,11 @@ def paths(self):
192192
index = set()
193193

194194
for file_ in self.commit.diff(self.commit.parents or NULL_TREE):
195+
# ignore deleted files (note they appear as ADDED)
196+
# in this backwards diff
197+
# TODO: set `deprecatedBy` for deleted paths
198+
if file_.change_type == 'A':
199+
continue
195200
path_ = Path(file_.a_path)
196201

197202
is_dataset = self.client.DATASETS in str(path_)

0 commit comments

Comments
 (0)