从短SHA中找到用于git diff的长SHA

Uma*_*til 5 git diff sha review-board

我在提交中生成差异/更改,以便我可以在ReviewBoard中上传它.

我使用了"git show d9f7121e8ebd4d1f789dab9f8214ada2h480b9cf".它给了我差异......

diff --git a/src/index.php b/src/index.php
index 3cfa8e8..7f8440d 100644
--- a/src/index.php
+++ b/src/index.php
@@ -12,10 +12,13 @@
 .test {
     .input;
     width: auto;
+    border-width: 5px;
+    border-radius: 50%;
 }
Run Code Online (Sandbox Code Playgroud)

当我创建这个差异的.patch文件时.Reviewboard拒绝它说"'3cfa8e8'修订版无效格式.SHA1太短".

所以我想从短SHA1'3cfa8e8'获得长SHA1.

我做了'git show 3cfa8e8'.它只是向我展示了一些文件内容.没有给我任何其他信息.

任何帮助我如何获得长SHA?

(注意: - 所有sha和文件差异都是示例来说明问题)

Nev*_*nel 8

git rev-parse <short sha> 应该做的伎俩.

另请参见git rev-parse联机帮助页.