This plugin provide local self git repogitory browser.
- `Commit History’ like GitHub (
git log
). - `Commit’ detail like GitHub (
git show
). - `Diff’ between hashes (
git diff
). - File blame like GitHub (
git blame
). - Display repogitory file tree (
git ls-tree
). - Display current branch name.
First, put `fatty’ directory on app/plugins in your CakePHP application.
Second, add the following code in bootstrap.php.
<?php Configure::write('Fatty.git_path', '/usr/local/bin/git'); // git path Configure::write('Fatty.git_dir', ROOT . DS . '.git' . DS); // local .git directory path
or
<?php define('FATTY_GIT_PATH', '/usr/local/bin/git'); // git path define('FATTY_GIT_DIR', ROOT . DS . '.git' . DS); // local .git directory path
Then, goto http://yourapp/fatty/ .
Double click anywhere, display repogitory file tree.
Add the following code in whichever controller you want to display current branch name like DebugKit toolbar (typically AppController).
<?php class AppController extends Controller { var $components = array('Fatty.Git'); }
Support CakePHP 1.3Support auto pagingSupportgit diff
any hashSupportgit blame
Support file commit log (git log file
)File tree (git ls-tree
)Fix multi_parents bug