On Mon, Aug 23, 2021 at 10:32 AM Nikita Bobko [off-list ref] wrote:
git init
echo foo > foo
git add --all
git commit -m 'foo'
echo bar > foo
git add --all
git commit -m 'bar'
git read-tree HEAD~:foo
EXP: Read information about file `foo` into index
ACT: `fatal: failed to unpack tree object HEAD~:foo`
I expect it to work because manpage says that `git-read-tree` accepts
`<tree-ish>`
HEAD~:foo is not a tree in your example, it's a blob. Try running
this: `git cat-file -t HEAD~:foo`, to see the type.