?
This document uses PHP Chinese website manual Release
git-get-tar-commit-id - 從使用 git-archive 創(chuàng)建的存檔中提取提交ID
git get-tar-commit-id
讀取由git archive
標準輸入創(chuàng)建的 tar 歸檔并提取存儲在其中的提交 ID。它只讀取前1024個字節(jié)的輸入,因此其運行時不受tar歸檔文件大小的影響。
如果未找到提交 ID,則git get-tar-commit-id
安靜地存在,返回代碼為1。如果未使用創(chuàng)建的存檔git archive
或第一個參數(shù)為git archive
樹 ID 而不是提交 ID 或標記,則會發(fā)生這種情況。