Re: git cat-file on a submodule

2017-01-11 Thread Junio C Hamano
Jeff King writes: > On Tue, Jan 10, 2017 at 07:11:40PM -0500, David Turner wrote: > >> Why does git cat-file -t $sha:foo, where foo is a submodule, not work? > ... > I'm not sure if I'm complaining or not. I can't immediately think of > something that would be horribly broken. But it really feels

Re: git cat-file on a submodule

2017-01-11 Thread David Turner
On Wed, 2017-01-11 at 07:53 -0500, Jeff King wrote: > On Tue, Jan 10, 2017 at 07:11:40PM -0500, David Turner wrote: > > > Why does git cat-file -t $sha:foo, where foo is a submodule, not work? > > Because "cat-file" is about inspecting items in the object database, and > typically the submodule c

Re: git cat-file on a submodule

2017-01-11 Thread Jeff King
On Tue, Jan 10, 2017 at 07:11:40PM -0500, David Turner wrote: > Why does git cat-file -t $sha:foo, where foo is a submodule, not work? Because "cat-file" is about inspecting items in the object database, and typically the submodule commit is not present in the superproject's database. So we canno

Re: git cat-file on a submodule

2017-01-10 Thread Stefan Beller
On Tue, Jan 10, 2017 at 4:11 PM, David Turner wrote: > Why does git cat-file -t $sha:foo, where foo is a submodule, not work? > > git rev-parse $sha:foo works. > > By "why", I mean "would anyone complain if I fixed it?" $ git log -- builtin/cat-file.c |grep -i -e gitlink -e submodule $ # no resul

git cat-file on a submodule

2017-01-10 Thread David Turner
Why does git cat-file -t $sha:foo, where foo is a submodule, not work? git rev-parse $sha:foo works. By "why", I mean "would anyone complain if I fixed it?" FWIW, I think -p should just return the submodule's sha.