We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 323383b commit fda777fCopy full SHA for fda777f
tests/units/test_init.rb
@@ -38,7 +38,10 @@ def test_git_init
38
assert(File.directory?(File.join(path, '.git')))
39
assert(File.exist?(File.join(path, '.git', 'config')))
40
assert_equal('false', repo.config('core.bare'))
41
- assert_equal("ref: refs/heads/master\n", File.read("#{path}/.git/HEAD"))
+
42
+ branch = `git config --get init.defaultBranch`.strip
43
+ branch = 'master' if branch.empty?
44
+ assert_equal("ref: refs/heads/#{branch}\n", File.read("#{path}/.git/HEAD"))
45
end
46
47
0 commit comments