Skip to content

Commit

Permalink
fix: replace unused diff() for perf
Browse files Browse the repository at this point in the history
  • Loading branch information
williamfzc committed Jan 9, 2024
1 parent 4279e89 commit 6b05dcf
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions srctag/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,7 @@ def collect_metadata(self) -> RuntimeContext:

@functools.lru_cache(maxsize=None)
def _process_diff_from_commit(self, commit: Commit) -> typing.Set[str]:
ret = set()
for each_diff in commit.diff():
each_b_path = each_diff.b_path
ret.add(each_b_path)
return ret
return set(commit.stats.files.keys())

def _process_relations(self, ctx: RuntimeContext):
"""
Expand Down

0 comments on commit 6b05dcf

Please sign in to comment.