# File lib/gitlab_git/diff.rb, line 18 def between(repo, head, base, *paths) # Only show what is new in the source branch compared to the target branch, not the other way around. # The linex below with merge_base is equivalent to diff with three dots (git diff branch1...branch2) # From the git documentation: "git diff A...B" is equivalent to "git diff $(git-merge-base A B) B" common_commit = repo.merge_base_commit(head, base) repo.diff(common_commit, head, *paths).map do |diff| Gitlab::Git::Diff.new(diff) end rescue Grit::Git::GitTimeout raise TimeoutError.new("Diff.between exited with timeout") end
Generated with the Darkfish Rdoc Generator 2.