Skip to content

Commit

Permalink
chore: always specify master as the initial git branch
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Fry <christopherfry@google.com>
  • Loading branch information
ChristopherFry committed Sep 25, 2023
1 parent 129cf53 commit 72bd0b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/e2e/fixture/fixture.go
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ func EnsureCleanState(t *testing.T, opts ...TestOption) {
// set-up tmp repo, must have unique name
FailOnErr(Run("", "cp", "-Rf", opt.testdata, repoDirectory()))
FailOnErr(Run(repoDirectory(), "chmod", "777", "."))
FailOnErr(Run(repoDirectory(), "git", "init"))
FailOnErr(Run(repoDirectory(), "git", "init", "-b", "master"))
FailOnErr(Run(repoDirectory(), "git", "add", "."))
FailOnErr(Run(repoDirectory(), "git", "commit", "-q", "-m", "initial commit"))

Expand Down Expand Up @@ -879,7 +879,7 @@ func CreateSubmoduleRepos(repoType string) {
// set-up submodule repo
FailOnErr(Run("", "cp", "-Rf", "testdata/git-submodule/", submoduleDirectory()))
FailOnErr(Run(submoduleDirectory(), "chmod", "777", "."))
FailOnErr(Run(submoduleDirectory(), "git", "init"))
FailOnErr(Run(submoduleDirectory(), "git", "init", "-b", "master"))
FailOnErr(Run(submoduleDirectory(), "git", "add", "."))
FailOnErr(Run(submoduleDirectory(), "git", "commit", "-q", "-m", "initial commit"))

Expand All @@ -891,7 +891,7 @@ func CreateSubmoduleRepos(repoType string) {
// set-up submodule parent repo
FailOnErr(Run("", "mkdir", submoduleParentDirectory()))
FailOnErr(Run(submoduleParentDirectory(), "chmod", "777", "."))
FailOnErr(Run(submoduleParentDirectory(), "git", "init"))
FailOnErr(Run(submoduleParentDirectory(), "git", "init", "-b", "master"))
FailOnErr(Run(submoduleParentDirectory(), "git", "add", "."))
FailOnErr(Run(submoduleParentDirectory(), "git", "submodule", "add", "-b", "master", "../submodule.git", "submodule/test"))
if repoType == "ssh" {
Expand Down

0 comments on commit 72bd0b6

Please sign in to comment.