Add changelog, change code to guard clause

This commit is contained in:
Jeroen Bobbeldijk 2016-04-11 18:11:49 +02:00
parent 08c3936b83
commit 27d2b35535
2 changed files with 6 additions and 3 deletions

View File

@ -35,6 +35,9 @@ v 8.7.0 (unreleased)
- ClosingIssueExtractor regex now also works with colons. e.g. "Fixes: #1234" !3591
- Update number of Todos in the sidebar when it's marked as "Done". !3600
v 8.6.6
- Fix error on language detection when repository has no HEAD (e.g., master branch). !3654
v 8.6.5
- Fix importing from GitHub Enterprise. !3529
- Perform the language detection after updating merge requests in `GitPushService`, leading to faster visual feedback for the end-user. !3533

View File

@ -896,9 +896,9 @@ class Repository
end
def main_language
unless empty? or rugged.head_unborn?
Linguist::Repository.new(rugged, rugged.head.target_id).language
end
return nil if empty? || rugged.head_unborn?
Linguist::Repository.new(rugged, rugged.head.target_id).language
end
def avatar