Skip to content
Discussion options

You must be logged in to vote

From what it seems, mini.git will show HEAD for the branch information when in detached head.

Yes, it is documented.

I know I could just get the full commit hash from minigit_summary and trim it but using something like git rev-parse --short HEAD would give me a "dynamic" sized short hash. In the codebases I work having 10 chars for the hash was not too uncommon.

Yes, explicitly trimming full commit hash is the suggested approach and it is what is done for minigit_summary_string. If you feel like 10 characters is needed, then always trimming to 10 characters doesn't seem like a big problem.

PS: To the reason for preferring the git hash over HEAD, ... perhaps I convince you to make th…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by echasnovski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested mini.git
2 participants