pub fn of_file(
city_root: &Path,
base: GitOid,
head: Head,
path: &str,
) -> Result<FilePatch, StorageError>Expand description
The patch text of one file between base and head.
One path per call, and the path is required: there is no shape here that answers for a whole batch, because a batch of patches is the thing this module’s neighbour refuses to put on a socket.
A file that did not move between the two commits answers with an empty patch and nothing withheld, which is a different answer from a commit this city never wrote — that one is the caller’s to report, because only the caller knows what it asked about.
§Errors
Propagates opening the repository, finding either commit, and walking the difference.