(self, diff, commit)
| 77 | self.func_commit[func_id] = sha |
| 78 | |
| 79 | def on_delete(self, diff, commit): |
| 80 | fname = diff.a_blob.path |
| 81 | sha = commit.hexsha |
| 82 | if self.fname_filter(fname): |
| 83 | last_commit = commit.parents[0] |
| 84 | file_contents = get_contents(self.repo, last_commit, fname) |
| 85 | func_ids, _ = self.func_extractor(file_contents, fname) |
| 86 | for func_id in func_ids: |
| 87 | if func_id in self.func_commit: |
| 88 | add_edge(self.G, sha, self.func_commit[func_id], func_id) |
| 89 | del self.func_commit[func_id] |
| 90 | |
| 91 | def on_rename(self, diff, commit): |
| 92 | # when similarity is 100%, diff.a_blob and diff.b_blob are None, so don't use them |
nothing calls this directly
no test coverage detected