@Override
    public String getShortRevision(String revision) {
        if (revision == null) return null;
        if (revision.length() < 7) return revision;
        return revision.substring(0, 7);
    }
@Test
    void shouldTruncateHashTo7CharsForAShortRevision() {
        Material git = new GitMaterial("file:///foo");
        assertThat(git.getShortRevision("dc3d7e656831d1b203d8b7a63c4de82e26604e52")).isEqualTo("dc3d7e6");
        assertThat(git.getShortRevision("24")).isEqualTo("24");
        assertThat(git.getShortRevision(null)).isNull();
    }