diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2022-09-18 20:32:26 +0200 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-09-28 23:01:20 +0900 |
commit | 3c3bd03a7c4d2213367c65a9aa92f255e1d6cbc9 (patch) | |
tree | 808a66f480eefcd0ca6d19861c2ee4c4be462843 /test/rubygems/package | |
parent | 28a572f8bffe54226a7ad3fae814c1c92b5036e6 (diff) | |
download | ruby-3c3bd03a7c4d2213367c65a9aa92f255e1d6cbc9.tar.gz |
[rubygems/rubygems] Force "master" to be used regardless of `init.defaultBranch` config
Otherwise, if you have `init.defaultBranch main` configured, like I do,
a bunch of tests fail with things like:
```
============================================================================================================================================================================================================
Error: test_checkout_submodules(TestGemSourceGit): Gem::Exception: unable to find reference master in /Users/deivid/Code/rubygems/rubygems/tmp/test_rubygems_20220928-13878-xog1je/git/a
/Users/deivid/Code/rubygems/rubygems/lib/rubygems/source/git.rb:188:in `rev_parse'
/Users/deivid/Code/rubygems/rubygems/lib/rubygems/source/git.rb:143:in `dir_shortref'
/Users/deivid/Code/rubygems/rubygems/lib/rubygems/source/git.rb:158:in `install_dir'
/Users/deivid/Code/rubygems/rubygems/lib/rubygems/source/git.rb:94:in `checkout'
/Users/deivid/Code/rubygems/rubygems/test/rubygems/test_gem_source_git.rb:78:in `test_checkout_submodules'
75: system @git, "commit", "--quiet", "-m", "add submodule b"
76: end
77:
=> 78: source.checkout
79:
80: assert_path_exist File.join source.install_dir, "a.gemspec"
81: assert_path_exist File.join source.install_dir, "b/b.gemspec"
============================================================================================================================================================================================================
fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument 'master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
E
```
In the future, I'd like to change things to use `main`, but the
straighforward fix now is to keep "master" and make the running
environment's git configuration not get in the middle.
https://github.com/rubygems/rubygems/commit/b09b1416f1
Diffstat (limited to 'test/rubygems/package')
0 files changed, 0 insertions, 0 deletions