I noticed that in git version
18.104.22.168 (provided by CentOS 7) it seems this command is not working:
git cat-file -t -- "5378198ea7a83f5fa9bb3ba17f51be3a6ffbecc1:README.md"
(Obviously specify a correct git hash and an existing file at that revision)
This is the standard error:
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
To me, it seems that the problem is the "
--" escape parameter that is interpreted as a type instead of an escape for consecutive arguments. In fact, this works to me:
git cat-file -t "5378198ea7a83f5fa9bb3ba17f51be3a6ffbecc1:README.md"
It exists with
0 with this result:
So, in short.
How do you suggest to proceed to discover when the "
--" parameter was introduced in git?
- https://git-scm.com/docs/git-cat-file (I don't see details)
- https://stackoverflow.com/questions/22750028/in-git-what-does-dash-dash-mean (no version/time details)
- https://github.com/git-lfs/git-lfs/issues/1072 (not related to git itself)