Commit 01e2177a authored by Kerri Miller's avatar Kerri Miller

Extract file path information from diffs directly

This somewhat duplicated logic from Gitlab::Git::File#file_path,
but to get at file path information through those objects, via
@diff_collection#diff_files, we trigger a circular and confusing
call back to this class. Copying the logic here isn't DRY, but it
reduces the cognitive load for devs working in this code, avoids the
potential circular reference, and generally makes life easier for
reviewers.
parent f2b22869
......@@ -112,6 +112,7 @@ module Gitlab
deprecated_cache.clear
end
#
def file_paths
strong_memoize(:file_paths) do
@diff_collection.diffs.collect(&:file_path)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment