# HG changeset patch # User Jakob Skjerning # Date 1249296706 -7200 # Node ID 592ccd16c55f701e9cf7e7e2a66fddcff433f0f9 # Parent 62f1488f85c300318a2a32c2e20fc24b8eaf2bbe Redmine wants the full path to the .git directory of the repository, so we need to step up to the parent directory before pulling diff -r 62f1488f85c300318a2a32c2e20fc24b8eaf2bbe -r 592ccd16c55f701e9cf7e7e2a66fddcff433f0f9 app/controllers/github_hook_controller.rb --- a/app/controllers/github_hook_controller.rb Sun Aug 02 20:44:43 2009 +0200 +++ b/app/controllers/github_hook_controller.rb Mon Aug 03 12:51:46 2009 +0200 @@ -16,7 +16,7 @@ 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}' && git pull" + command = "cd '#{repository.url}' && cd .. && git pull" exec(command) render(:text => 'OK') @@ -25,7 +25,7 @@ private def exec(command) - logger.debug { "GitHook: Executing command: '#{command}'" } + logger.info { "GithubHook: Executing command: '#{command}'" } `#{command}` end