我注意到在 git 版本1.8.3.1
(由 CentOS 7 提供)中,这个命令似乎不起作用:
git cat-file -t -- "5378198ea7a83f5fa9bb3ba17f51be3a6ffbecc1:README.md"
(显然指定正确的 git 散列和该版本的现有文件)
这是标准错误:
usage: git cat-file (-t|-s|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch|--batch-check) < <list_of_objects>
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--batch show info and content of objects fed from the standard input
--batch-check show info about objects fed from the standard input
对我来说,问题似乎是“ --
”转义参数被解释为一种类型而不是连续参数的转义。事实上,这对我有用:
git cat-file -t "5378198ea7a83f5fa9bb3ba17f51be3a6ffbecc1:README.md"
它存在并0
具有以下结果:
blob
所以,简而言之。
问题
您建议如何继续发现--
git 中引入“”参数的时间?
相关文件: