Re: get commit ID from a tree object ID

2018-03-26 Thread Jonathan Nieder
Hi, Stefan Beller wrote: > On Sat, Mar 17, 2018 at 10:57 AM Junio C Hamano wrote: >> Jeff King writes: >>> If you want to dig further, you can use the diff machinery to show which >>> commit introduced a particular tree, like: >>> >>> git rev-list --all |

Re: get commit ID from a tree object ID

2018-03-26 Thread Stefan Beller
On Sat, Mar 17, 2018 at 10:57 AM Junio C Hamano wrote: > Jeff King writes: > > If you want to dig further, you can use the diff machinery to show which > > commit introduced a particular tree, like: > > > > git rev-list --all | > > git diff-tree --stdin

Re: get commit ID from a tree object ID

2018-03-17 Thread Junio C Hamano
Jeff King writes: > If you want to dig further, you can use the diff machinery to show which > commit introduced a particular tree, like: > > git rev-list --all | > git diff-tree --stdin --pretty=raw --raw -t -r | > less +/$desired_tree > > That "less" will find the

Re: get commit ID from a tree object ID

2018-03-17 Thread Jeff King
On Sat, Mar 17, 2018 at 04:01:28PM +0300, Konstantin Khomoutov wrote: > So actually a generic approach to what you need is a full scan of all > the commits in the repository with recursive traversing of the hierarchy > of trees of each of them (via `git ls-tree`) and looking for the SHA-1 > name

Re: get commit ID from a tree object ID

2018-03-17 Thread Konstantin Khomoutov
On Sat, Mar 17, 2018 at 01:17:12PM +0100, Michal Novotny wrote: > let's say I have made an annotated tag on a certain treeish: > > $ git tag -a -m msg tagname HEAD: > > Now, I can try to see the content of the tag: > > $ git tag -v tagname > object 42a1c36553a50ceae2f75ffc4b1446c6c393eae7 >

get commit ID from a tree object ID

2018-03-17 Thread Michal Novotny
Hello, let's say I have made an annotated tag on a certain treeish: $ git tag -a -m msg tagname HEAD: Now, I can try to see the content of the tag: $ git tag -v tagname object 42a1c36553a50ceae2f75ffc4b1446c6c393eae7 type tree tag tagname tagger clime 1521288727 +0100 msg