我可以通過標簽獲得遠程存盤庫的哈希v0.94.9
git ls-remote https://github.com/status-im/status-go v0.94.9
如何獲取此標簽的提交訊息?我不想克隆該存盤庫,只需獲取該標記的提交訊息v0.94.9
uj5u.com熱心網友回復:
提供僅 GitHub 的解決方案(使用 GitHub API):
#!/bin/bash
url=$(curl https://api.github.com/repos/status-im/status-go/git/ref/tags/v0.94.9 | jq -r .object.url)
curl "$url" | jq -r .message
TODO:使用Smart HTTP(S) 協議的答案:
#!/bin/bash
commit=$(curl -s --output - "https://github.com/status-im/status-go/info/refs?service=git-upload-pack" | grep -a "v0.94.9" | awk '{print $1}' | cut -b 5- -)
# need help for pack-protocol implementation with curl
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/435155.html
標籤:混帐
