Commit 64135a3f1e53581109d17fdd30d78438e176fc0e

Authored by Rafael Manzo
Committed by Heitor
1 parent 466a15b4

Comments about default branch selection

app/assets/javascripts/repository/branch.js.coffee
@@ -15,10 +15,12 @@ class Repository.Branch @@ -15,10 +15,12 @@ class Repository.Branch
15 @request.abort() 15 @request.abort()
16 @request = null 16 @request = null
17 17
18 - # private method  
19 fill_options: (options, el) -> 18 fill_options: (options, el) ->
  19 + # FIXME: this works only if master is the default branch
  20 + # it can be improved by moving it into KalibroProcessor
20 default_branch = "master" 21 default_branch = "master"
21 if default_branch in options 22 if default_branch in options
  23 + # Brings the default branch as the first option
22 index = options.indexOf(default_branch) 24 index = options.indexOf(default_branch)
23 options.splice(index, 1) 25 options.splice(index, 1)
24 options.unshift(default_branch) 26 options.unshift(default_branch)