# HG changeset patch # User abronte # Date 1261953208 28800 # Node ID 416f4752db74a759e8fe25a9d6376c2417abf326 # Parent ee7c44455ce1e1cac1d0c15a7d0db26fbd756430 Changed the git commands to support minimal local git repo. It's not likely to have an entire repo on the same machine as redmine. Redmine also only requires the .git portion of a repo. See http://www.redmine.org/wiki/redmine/HowTo_keep_in_sync_your_git_repository_for_redmine diff -r ee7c44455ce1e1cac1d0c15a7d0db26fbd756430 -r 416f4752db74a759e8fe25a9d6376c2417abf326 app/controllers/github_hook_controller.rb --- a/app/controllers/github_hook_controller.rb Sun Dec 27 14:31:26 2009 -0800 +++ b/app/controllers/github_hook_controller.rb Sun Dec 27 14:33:28 2009 -0800 @@ -20,7 +20,8 @@ raise TypeError, "Repository for project '#{identifier}' is not a Git repository" unless repository.is_a?(Repository::Git) # Get updates from the Github repository - command = "cd '#{repository.url}' && cd .. && git pull --rebase" + #command = "cd '#{repository.url}' && cd .. && git pull --rebase" + command = "cd '#{repository.url}' && git fetch origin && git reset --soft refs/remotes/origin/master" exec(command) # Fetch the new changesets into Redmine