Commits

Adam Bronte  committed 416f475

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

  • Participants
  • Parent commits ee7c444

Comments (0)

Files changed (1)

File app/controllers/github_hook_controller.rb

     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