[英]go-git: Create short hash (a83ad00 instead of a83ad004b3c5...)
I am using go-git and I would like to print the short hash.我正在使用go-git ,我想打印短哈希。
I mean, for example "a83ad00" instead of "a83ad004b3c5971a194ba86b96fe313b94bbcde7".我的意思是,例如“a83ad00”而不是“a83ad004b3c5971a194ba86b96fe313b94bbcde7”。
I looked at the source code of got-git, but could not find a corresponding function.看了下got-git的源码,没找到对应的函数。
How to get the short "partial" hash?如何获得简短的“部分”哈希?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.