diff options
author | Demelziraptor <demelza@circularvale.com> | 2012-05-16 14:34:10 +0100 |
---|---|---|
committer | Demelziraptor <demelza@circularvale.com> | 2012-05-16 14:47:59 +0100 |
commit | e5bbefc98025b1b9f67b8635807d43f60be55c30 (patch) | |
tree | 89a14bde7e6e9494bb370f076584854fea97ffb1 /app/models/commit.rb | |
parent | 1b85cbc6d638e8ddbde1ebcb71cb9fc195fb3012 (diff) | |
download | gitlab-ce-e5bbefc98025b1b9f67b8635807d43f60be55c30.tar.gz |
change find_or_first to work with default branch
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 |