summaryrefslogtreecommitdiff
path: root/lib/gitlab/git/compare.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/git/compare.rb')
-rw-r--r--lib/gitlab/git/compare.rb35
1 files changed, 0 insertions, 35 deletions
diff --git a/lib/gitlab/git/compare.rb b/lib/gitlab/git/compare.rb
deleted file mode 100644
index e34f204e8bd..00000000000
--- a/lib/gitlab/git/compare.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-module Gitlab
- module Git
- class Compare
- attr_accessor :commits, :commit, :diffs, :same
-
- def initialize(repository, from, to)
- @commits, @diffs = [], []
- @commit = nil
- @same = false
-
- return unless from && to
-
- first = repository.commit(to.try(:strip))
- last = repository.commit(from.try(:strip))
-
- return unless first && last
-
- if first.id == last.id
- @same = true
- return
- end
-
- @commit = first
- @commits = repository.commits_between(last.id, first.id)
-
- @diffs = if @commits.size > 100
- []
- else
- repository.repo.diff(last.id, first.id) rescue []
- end
- end
- end
- end
-end
-