diff --git a/lib/redmine/scm/adapters/git_adapter.rb b/lib/redmine/scm/adapters/git_adapter.rb index 14e1674..69ce6a7 100644 --- a/lib/redmine/scm/adapters/git_adapter.rb +++ b/lib/redmine/scm/adapters/git_adapter.rb @@ -111,8 +111,9 @@ module Redmine end def num_revisions - cmd = "#{GIT_BIN} --git-dir #{target('')} log --all --pretty=format:'' | wc -l" - shellout(cmd) {|io| io.gets.chomp.to_i + 1} + cmd = "#{GIT_BIN} --git-dir #{target('')} log --all --pretty=format:''" + num = 1 + shellout(cmd) {|io| num += 1} end def revisions(path, identifier_from, identifier_to, options={})