ajoberstar / reckon

Infer a project's version from your Git repository.
Apache License 2.0
187 stars 28 forks source link

Use an abbreviated commit hash in the build metadata #86

Closed jco2641 closed 6 years ago

jco2641 commented 6 years ago

What is the rationale behind using the full commit hash in the insignificant versions, vs the abbreviated commit hash git provides? As I understand it, the abbreviated hash will expose enough characters to ensure it is unambiguous for referring to a commit.

ajoberstar commented 6 years ago

This was partly based on the way Grgit's abbreviated hash is computed currently (it's just a straight substring). However, there is a more reliable option in JGit that I could use, so I've opened an issue (ajoberstar/grgit#238) to enhance that.

Given that improvement and the unlikelihood of even a 7 character hash having a collision, I'd be fine switching these to abbreviated ones. It would be more user friendly.