Make Repository.shortenRefName static The method has no reason to be non-static. Change-Id: I1c09e074395d49cee0e6e53679b499d1f0c351ea