See PHI254. See T9915 for an earlier report.
When "poems" is a submodule, it:
- does not respond to git cat-file -t <commit>:poems/; and
- does not respond, in a different way, to git cat-file -t <commit>:poems.
These commands are executed via diffusion.browsequery, and can be hit in the UI by adding a submodule path (with no slash) to Owners and clicking the link, or in other ways.
Here's what happens:
epriestley@orbital ~/dev/scratch/git-test-local $ git ls-tree HEAD 100644 blob 4b03ca691fb0787bc47ad2e7839fe66977be685f .gitmodules 160000 commit da741f11202f505ead4514591d837b729bb8ce63 poems epriestley@orbital ~/dev/scratch/git-test-local $ git cat-file -t HEAD:poems/ fatal: Not a valid object name HEAD:poems/ epriestley@orbital ~/dev/scratch/git-test-local $ git cat-file -t HEAD:poems fatal: git cat-file: could not get object info
There's some code to detect and recover from "Not a valid object" already, although it may not account for submodules correctly. A possible approach is to use git ls-tree -d <commit> -- <path> to recover (note that command is also case sensitive). There doesn't seem to be much help from git submodule.