| 655 | } |
| 656 | |
| 657 | var clean_paths = function(commits) { |
| 658 | var new_commits = {}; |
| 659 | // Iterate over all the commit hash entries and clean the directory names |
| 660 | Object.keys(commits).forEach(function(file) { |
| 661 | var sha = commits[file]; |
| 662 | file = file.substr(file.length - 1, 1) == '/' ? file.substr(0, file.length - 1) : file; |
| 663 | new_commits[file] = sha; |
| 664 | }) |
| 665 | // Return all the cleaned commits |
| 666 | return new_commits; |
| 667 | } |
| 668 | |
| 669 | // Fetch blame tree |
| 670 | Git.prototype.blame_tree = function(commit, path, callback) { |