Re: git cat-file on a submodule

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 10, 2017 at 4:11 PM, David Turner <novalis@xxxxxxxxxxx> 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 result

I think nobody cared so far. Go for it!

> FWIW, I think
> -p should just return the submodule's sha.

That sounds right as the sha1 is also printed for the tree already, i.e.
in Gerrit you can get the submodules via
$ git cat-file -p HEAD:plugins/
100644 blob c6bb7f182440d6ab860bbcfadc9901b0d94d1ee3 BUCK
160000 commit 9b163e113de9f3a49219a02d388f7f46ea2559d3
commit-message-length-validator
160000 commit 69b8f9f413ce83a71593a4068a3b8e81f684cbad cookbook-plugin
160000 commit 7b41f3a413b46140b050ae5324cbbcdd467d2b3a download-commands
160000 commit 3acc14d10d26678eae6489038fe0d4dad644a9b4 hooks
160000 commit c5123d6a5604cc740d6f42485235c0d3ec141c4e replication
160000 commit 3f3d572e9618f268b19cc54856deee4c96180e4c reviewnotes
160000 commit 3ca1167edda713f4bfdcecd9c0e2626797d7027f singleusergroup

"commit <sha1>" is the correct answer already :)

Thanks,
Stefan



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]