Skip to content
This repository has been archived by the owner on May 12, 2018. It is now read-only.

Commit

Permalink
sort repos heads
Browse files Browse the repository at this point in the history
  • Loading branch information
dzaporozhets committed Apr 30, 2013
1 parent 2d4ac2c commit 07a039c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/gitlab_git/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions spec/repository_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 07a039c

Please sign in to comment.