diff options
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index 263e2f74296..574f69bc213 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -23,11 +23,11 @@ class Commit class << self - def find_or_first(repo, commit_id = nil) + def find_or_first(repo, commit_id = nil, root_ref) commit = if commit_id repo.commit(commit_id) else - repo.commits.first + repo.commits(root_ref).first end Commit.new(commit) if commit end |