Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing test due to hardcoded refs/heads/master in tests/units/test_init.rb@test_git_init #587

Closed
liijunwei opened this issue Jul 23, 2022 · 1 comment

Comments

@liijunwei
Copy link
Contributor

liijunwei commented Jul 23, 2022

Subject of the issue

Failing test

Your environment

  • git version: 2.37.1
  • version of ruby-git: commit 6f2b3fd
  • version of ruby: ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x86_64-darwin20]

Steps to reproduce

  1. clone repo and cd into repo
  2. bundle
  3. git config init.defaultBranch main
  4. rake test

Expected behaviour

Expect test_git_init to pass

Actual behaviour

<"ref: refs/heads/master\n"> expected but was
<"ref: refs/heads/main\n">

image

@liijunwei
Copy link
Contributor Author

assert_equal("ref: refs/heads/master\n", File.read("#{path}/.git/HEAD"))

liijunwei added a commit to liijunwei/ruby-git that referenced this issue Jul 23, 2022
liijunwei added a commit to liijunwei/ruby-git that referenced this issue Jul 23, 2022
Signed-off-by: lijunwei <ljw532344863@sina.com>
liijunwei added a commit to liijunwei/ruby-git that referenced this issue Aug 18, 2022
+ fix test when `init.defaultBranch` is not set by assigning default value
Signed-off-by: lijunwei <ljw532344863@sina.com>
liijunwei added a commit to liijunwei/ruby-git that referenced this issue Aug 19, 2022
+ fix test when `init.defaultBranch` is not set by assigning default value
Signed-off-by: lijunwei <ljw532344863@sina.com>
liijunwei added a commit to liijunwei/ruby-git that referenced this issue Aug 19, 2022
+ fix test when `init.defaultBranch` is not set by assigning default value
Signed-off-by: lijunwei <ljw532344863@sina.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant