From 4c1fee0af1c1153ac1f424d096a96a463730e1c0 Mon Sep 17 00:00:00 2001 From: Igor Muzyka Date: Thu, 20 Feb 2014 11:14:28 +0200 Subject: [PATCH] Added description of repo.current_commit and how to get unlimited commits by repo.commits to README.md --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b69f77e..c0ecabb 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ Or to a different tag or branch. repo.commits "v0.0.3", (err, commits) -> -Limit the maximum number of commits returned. +Limit the maximum number of commits returned (by default limit is 10). repo.commits "master", 30, (err, commits) -> @@ -71,6 +71,15 @@ Skip some (for pagination): repo.commits "master", 30, 30, (err, commits) -> +To get unlimited amount of commits: + + repo.commits "master", -1, (err, commits) -> + +### `Repo#current_commit(callback)` +Get current commit + +The callback receives `(err, commit)`. + ### `Repo#tree([treeish]) => Tree` The `Tree` object for the treeish (which defaults to "master").