Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unstable sha commit length #48

Closed
mutalimov95 opened this issue May 1, 2022 · 2 comments
Closed

Unstable sha commit length #48

mutalimov95 opened this issue May 1, 2022 · 2 comments
Labels
enhancement New feature or request question Further information is requested
Milestone

Comments

@mutalimov95
Copy link

Sometimes when I use {commit} in format I get 8 characters length (in many cases I get 9 characters length).
I don't know why this is happening and how to predict the length of the sha.

@mtkennerly mtkennerly added the question Further information is requested label May 3, 2022
@mtkennerly
Copy link
Owner

Dunamai just takes the hash returned by the VCS tool (e.g., git log -n 1 --format="format:%h"), so it's up to the VCS. For example, using Git, I get 7 characters in the Dunamai repository as well as in a new repo with one commit, but I get 8 characters in a repository with over 2,000 commits, so I think it gradually increases the length to avoid collisions.

@mtkennerly mtkennerly added this to the v1.12.0 milestone May 6, 2022
@mtkennerly mtkennerly added the enhancement New feature or request label May 6, 2022
@mtkennerly
Copy link
Owner

The next release will provide a --full-commit option so that you can always get the full hash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants