inject Repository in Diff as an optional attribute