summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlec Cooper <ahnolds@gmail.com>2015-11-12 21:38:26 -0500
committerAlec Cooper <ahnolds@gmail.com>2015-11-14 15:00:55 -0500
commit4bb99677b1ddee84ab0433efe081de8025e5aa53 (patch)
treed6a2771f2c3224228b19a812cdd990d6f5655ffa /lib
parentaec9f211e534900f602e769dcdd6f69730849f92 (diff)
downloadgitlab-ce-4bb99677b1ddee84ab0433efe081de8025e5aa53.tar.gz
Relative links in the README file shown on the repository homepage should point
to the default branch, not to master
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/markdown/relative_link_filter.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/markdown/relative_link_filter.rb b/lib/gitlab/markdown/relative_link_filter.rb
index 6ee3d1ce039..632be4d7542 100644
--- a/lib/gitlab/markdown/relative_link_filter.rb
+++ b/lib/gitlab/markdown/relative_link_filter.rb
@@ -51,7 +51,7 @@ module Gitlab
relative_url_root,
context[:project].path_with_namespace,
path_type(file_path),
- ref || 'master', # assume that if no ref exists we can point to master
+ ref || context[:project].default_branch, # if no ref exists, point to the default branch
file_path
].compact.join('/').squeeze('/').chomp('/')