Added repoBeforeReadRef hook into Repository