{"thread":{"id":"165","subject":"[PATCH 4/4] Use tree_from_tree_or_commit() in ls-tree.","startedAt":"2005-04-20T06:11:00Z","lastAt":"2005-04-20T06:11:00Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"945","messageId":"7v4qe2kmff.fsf@assigned-by-dhcp.cox.net","threadId":"165","inReplyTo":null,"subject":"[PATCH 4/4] Use tree_from_tree_or_commit() in ls-tree.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-04-20T06:11:00Z","receivedAt":"2005-04-20T06:11:00Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This patch makes ls-tree accept either tree or commit.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n\n ls-tree.c |    2 +-\n 1 files changed, 1 insertion(+), 1 deletion(-)\n\nMakefile: needs update\ncache.h: needs update\nsha1_file.c: needs update\n--- a/ls-tree.c\n+++ b/ls-tree.c\n@@ -74,7 +74,7 @@ static int list(unsigned char *sha1)\n \tunsigned long size;\n \tchar type[20];\n \n-\tbuffer = read_sha1_file(sha1, type, &size);\n+\tbuffer = tree_from_tree_or_commit(sha1, type, &size);\n \tif (!buffer)\n \t\tdie(\"unable to read sha1 file\");\n \tlist_recursive(buffer, type, size, NULL);\n\n"}]}