7-digit git hash expanded to 8 in UI

When I past a text in a UI comment that contains 7-digit git hash (obtained with git describe --tags --dirty for ex.) and save the comment, I see 7 digits of the short commit hash expanded to 8.

The text is manipulated in such a way that it looses consistency with the original data. I was putting an exact version string, that was created by the aforementioned command and gitlab tampered it without me noticing.

It looks like gitlab is not as 'smart' as git itself, as it does not follow the behaviour, described in git man:

core.abbrev

      Set the length object names are abbreviated to. If unspecified or set to “auto”, an appropriate value is computed based on the approximate number of packed objects in your
      repository, which hopefully is enough for abbreviated object names to stay unique for some time. The minimum length is 4.

git-config(1)

Edited Aug 07, 2018 by Aleksandr Vinokurov
Assignee Loading
Time tracking Loading