From 01abd3194eaacb6ea57abee94d169d01e5960a9a Mon Sep 17 00:00:00 2001 From: Alex Birkett Date: Sat, 27 Dec 2014 00:35:22 +0100 Subject: [PATCH] Update README.md ```repo.loadAs()``` expects a hash as the second parameter. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0f23e0a..7ca3e7c 100644 --- a/README.md +++ b/README.md @@ -147,7 +147,7 @@ var commit = yield repo.loadAs("commit", commitHash); // We then read the tree using `commit.tree`. var tree = yield repo.loadAs("tree", commit.tree); // We then read the file using the entry hash in the tree. -var file = yield repo.loadAs("blob", tree["greeting.txt"]); +var file = yield repo.loadAs("blob", tree["greeting.txt"].hash); // file is now a binary buffer. ```