From 020a8482a47de625e2bfaa6f13a12e7cd8fe3600 Mon Sep 17 00:00:00 2001 From: Zeger-Jan van de Weg Date: Fri, 1 Dec 2017 15:32:57 +0100 Subject: Use commit finder instead of rev parse This has the side effect of making this method rugged call free, which is the reason I actually changed this. --- app/models/repository.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index 165dafd83fd..82af299ec5e 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -256,7 +256,7 @@ class Repository end def diverging_commit_counts(branch) - root_ref_hash = raw_repository.rev_parse_target(root_ref).oid + root_ref_hash = raw_repository.commit(root_ref).id cache.fetch(:"diverging_commit_counts_#{branch.name}") do # Rugged seems to throw a `ReferenceError` when given branch_names rather # than SHA-1 hashes -- cgit v1.2.1