Skip to content

git: ReadFile calls NewFileReader

Administrator requested to merge k/20220419-git-read-file into main

Created by: keegancsmith

ReadFile has a bit more business logic since we introduced FilterActorPath. Lets rather make it wrap NewFileReader so that it doesn't need to duplicate that work and instead only handles what is unique to it.

This also makes it much more clear that this is a convenience function for future refactors.

The functional change here is we will now have an extra span in our tracing for every ReadFile call. This seems fine and potentially useful from the perspective of differentiating the time it takes to start reading and the time it takes to read.

This is a random improvement I noticed. Feel free to not approve.

Test Plan: CI

Merge request reports

Loading