diff --git a/lib/gitlab_git/repository.rb b/lib/gitlab_git/repository.rb index 402f393..1fdd928 100644 --- a/lib/gitlab_git/repository.rb +++ b/lib/gitlab_git/repository.rb @@ -125,7 +125,7 @@ def ref_names end def heads - @heads ||= repo.heads + @heads ||= repo.heads.sort_by(&:name) end def tree(fcommit, path = nil) diff --git a/spec/repository_spec.rb b/spec/repository_spec.rb index 2369a53..258142d 100644 --- a/spec/repository_spec.rb +++ b/spec/repository_spec.rb @@ -168,12 +168,12 @@ context :head do subject { heads.first } - its(:name) { should == 'deploy_keys' } + its(:name) { should == '2_3_notes_fix' } context :commit do subject { heads.first.commit } - its(:id) { should == 'dda6b0ab63eb8080e34b4273cfb6aadb7a29c028' } + its(:id) { should == '8470d70da67355c9c009e4401746b1d5410af2e3' } end end end