{"thread":{"id":"4089","subject":"[PATCH] Fix crash when reading the empty tree","startedAt":"2006-05-07T15:42:37Z","lastAt":"2006-05-07T15:42:37Z","messageCount":1,"participants":["Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"19651","messageId":"Pine.LNX.4.63.0605071742240.5906@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"4089","inReplyTo":null,"subject":"[PATCH] Fix crash when reading the empty tree","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-05-07T15:42:37Z","receivedAt":"2006-05-07T15:42:37Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\ncvsimport needs to call git-read-tree without arguments to create an empty\ntree.\n\nSigned-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n---\n read-tree.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/read-tree.c b/read-tree.c\nindex 067fb95..a060a97 100644\n--- a/read-tree.c\n+++ b/read-tree.c\n@@ -881,7 +881,7 @@ int main(int argc, char **argv)\n \t * valid cache-tree because the index must match exactly\n \t * what came from the tree.\n \t */\n-\tif (trees->item && (!merge || (stage == 2))) {\n+\tif (trees && trees->item && (!merge || (stage == 2))) {\n \t\tcache_tree_free(&active_cache_tree);\t\t\n \t\tprime_cache_tree();\n \t}\n-- \n1.3.2.g5131-dirty\n"}]}