Name
Mojito::Page::Git - the git backend
Methods
commit_page
Commit a page revision to the git repository.
rm_page
Remove a page from the repo (done when deleting a page from the DB)
diff_page
Get the diff between two versions of a page. Diff a Page: $m and $n are the number of ^ we'll use from HEAD. Example:
diff/3/1 would mean git diff HEAD^^^ HEAD^ $page_id
search_word
Search for a word using git grep and return the list of matching document ids. NOTE: A document can be returned more than once so we'll make hash of documents with the count of how many times they matched.
get_author_for
Given a page id find the author of the last commit.