Closed ljm42 closed 2 years ago
The test merge: branches with encrypted file - line changes both branches, with conflicts assumes the initial branch is named "main": https://github.com/elasticdog/transcrypt/blob/00a2cbb660f9e47e553159d3cb9461f226100c8a/tests/test_merge.bats#L93
merge: branches with encrypted file - line changes both branches, with conflicts
That means if you haven't set the defaultBranch, or if you set it to something other than main: git config --global init.defaultBranch trunk the test will fail.
git config --global init.defaultBranch trunk
A backwards compatible fix is right after this line: https://github.com/elasticdog/transcrypt/blob/00a2cbb660f9e47e553159d3cb9461f226100c8a/tests/_test_helper.bash#L10 add: git checkout -b main
git checkout -b main
This is another option, but it requires a fairly recent version of git: git init --initial-branch=main "$BATS_TEST_DIRNAME"
git init --initial-branch=main "$BATS_TEST_DIRNAME"
( thanks to https://stackoverflow.com/a/42871621 )
Fixed in #144 now merged
The test
merge: branches with encrypted file - line changes both branches, with conflicts
assumes the initial branch is named "main": https://github.com/elasticdog/transcrypt/blob/00a2cbb660f9e47e553159d3cb9461f226100c8a/tests/test_merge.bats#L93That means if you haven't set the defaultBranch, or if you set it to something other than main:
git config --global init.defaultBranch trunk
the test will fail.A backwards compatible fix is right after this line: https://github.com/elasticdog/transcrypt/blob/00a2cbb660f9e47e553159d3cb9461f226100c8a/tests/_test_helper.bash#L10 add:
git checkout -b main
This is another option, but it requires a fairly recent version of git:
git init --initial-branch=main "$BATS_TEST_DIRNAME"
( thanks to https://stackoverflow.com/a/42871621 )