aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-05-01 12:03:10 -0400
committerUnknown <joe2010xtmf@163.com>2014-05-01 12:03:10 -0400
commit75109bbd653f69e4a924b6654e564341e4bcf229 (patch)
treefa3a334790fc5ed244ffa9fd0fff6ea8733a3a25 /templates/repo
parent0a187dbef5d2480f8d47b8013f6e21e06ea18cbd (diff)
downloadgitea-75109bbd653f69e4a924b6654e564341e4bcf229.tar.gz
gitea-75109bbd653f69e4a924b6654e564341e4bcf229.zip
Fix panic when no master branch
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/setting.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/setting.tmpl b/templates/repo/setting.tmpl
index afa66d1de1..f0f041dee8 100644
--- a/templates/repo/setting.tmpl
+++ b/templates/repo/setting.tmpl
@@ -41,7 +41,7 @@
<label class="col-md-3 text-right">Default Branch</label>
<div class="col-md-3">
<select name="branch" id="repo-default-branch" class="form-control">
- <option value="{{.Repository.DefaultBranch}}">{{.Repository.DefaultBranch}}</option>
+ {{if .Repository.DefaultBranch}}<option value="{{.Repository.DefaultBranch}}">{{.Repository.DefaultBranch}}</option>{{end}}
{{range .Branches}}
{{if eq . $.Repository.DefaultBranch}}{{else}}<option value="{{.}}">{{.}}</option>{{end}}
{{end}}