-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make tests work on machines where the git init.defaultBranch is set to something different than master.
- Loading branch information
Showing
11 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ popd | |
D="$(mktemp -d)" | ||
pushd "$D" | ||
git init . | ||
git checkout -b master | ||
git config user.email "[email protected]" | ||
git config user.name test | ||
echo "first" > first.txt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ rm -rf default.yaml | |
gitDir=$(mktemp -d) | ||
pushd "${gitDir}" | ||
git init | ||
git checkout -b master | ||
git config user.email "[email protected]" | ||
git config user.name test | ||
echo "git" > test.dat | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ repo=$dir/repo.git | |
init_repo() { | ||
mkdir "$1" | ||
git init "$1" | ||
git -C "$1" checkout -b master | ||
git -C "$1" config user.email "[email protected]" | ||
git -C "$1" config user.name test | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ cp t.yaml "$bob/recipes" | |
work=$dir/_work | ||
mkdir "$work" | ||
git init "$work" | ||
git -C "$work" checkout -b master | ||
git -C "$work" config user.email "[email protected]" | ||
git -C "$work" config user.name test | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ pushd "$git_submod" | |
git init . | ||
git config user.email "[email protected]" | ||
git config user.name test | ||
git checkout -b master | ||
echo sub > sub.txt | ||
git add sub.txt | ||
git commit -m import | ||
|
@@ -26,6 +27,7 @@ pushd "$git_dir1" | |
git init . | ||
git config user.email "[email protected]" | ||
git config user.name test | ||
git checkout -b master | ||
echo "hello world" > test.txt | ||
git add test.txt | ||
git commit -m "initial commit" | ||
|
@@ -46,6 +48,7 @@ pushd "$git_dir2" | |
git init . | ||
git config user.email "[email protected]" | ||
git config user.name test | ||
git checkout -b master | ||
echo "hello bob" > bob.txt | ||
git add bob.txt | ||
git commit -m "first commit" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ cp recipe1.yaml "$bob/recipes/t.yaml" | |
work=$dir/work | ||
mkdir "$work" | ||
git init "$work" | ||
git -C "$work" checkout -b master | ||
git -C "$work" config user.email "[email protected]" | ||
git -C "$work" config user.name test | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ pushd "$git_dir1" | |
git init . | ||
git config user.email "[email protected]" | ||
git config user.name test | ||
git checkout -b master | ||
echo "commit-1" > git1.txt | ||
git add git1.txt | ||
git commit -m "initial commit" | ||
|
@@ -28,6 +29,7 @@ pushd "$git_dir2" | |
git init . | ||
git config user.email "[email protected]" | ||
git config user.name test | ||
git checkout -b master | ||
echo "commit-1" > git2.txt | ||
git add git2.txt | ||
git commit -m "first commit" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ pushd ${gitDir} | |
git init | ||
git config user.email "[email protected]" | ||
git config user.name test | ||
git checkout -b master | ||
echo "git" > test.dat | ||
git add test.dat | ||
git commit -m "added test" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -228,6 +228,7 @@ def setUpClass(cls): | |
'git init .', | ||
'git config user.email "[email protected]"', | ||
'git config user.name test', | ||
'git checkout -b master', | ||
'echo "hello world" > test.txt', | ||
'git add test.txt', | ||
'git commit -m "first commit"', | ||
|
@@ -416,6 +417,7 @@ def setUpClass(cls): | |
git init . | ||
git config user.email "[email protected]" | ||
git config user.name test | ||
git checkout -b master | ||
for i in $(seq 3) ; do | ||
echo "#$i" > test.txt | ||
|
@@ -520,6 +522,7 @@ def setUp(self): | |
git init . | ||
git config user.email "[email protected]" | ||
git config user.name test | ||
git checkout -b master | ||
echo subsub > subsub.txt | ||
git add subsub.txt | ||
git commit -m import | ||
|
@@ -530,6 +533,7 @@ def setUp(self): | |
git init . | ||
git config user.email "[email protected]" | ||
git config user.name test | ||
git checkout -b master | ||
echo 1 > test.txt | ||
git add test.txt | ||
mkdir -p some/deep | ||
|
@@ -542,6 +546,7 @@ def setUp(self): | |
# setup main module and add first submodule | ||
cd main | ||
git init . | ||
git checkout -b master | ||
git config user.email "[email protected]" | ||
git config user.name test | ||
echo 1 > test.txt | ||
|
@@ -619,6 +624,7 @@ def addSub2(self): | |
cmds = """\ | ||
cd sub2 | ||
git init . | ||
git checkout -b master | ||
git config user.email "[email protected]" | ||
git config user.name test | ||
echo 2 > test.txt | ||
|
@@ -882,6 +888,7 @@ def setUp(self): | |
|
||
cmds = """\ | ||
git init . | ||
git checkout -b master | ||
git config user.email "[email protected]" | ||
git config user.name test | ||
echo -n "hello world" > test.txt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,8 @@ def setUp(self): | |
self.callGit('git config user.email "[email protected]"', cwd=self.repodir) | ||
self.callGit('git config user.name test', cwd=self.repodir) | ||
|
||
self.callGit('git checkout -b master', cwd=self.repodir) | ||
|
||
f = open(os.path.join(self.repodir, "test.txt"), "w") | ||
f.write("hello world") | ||
f.close() | ||
|
@@ -169,6 +171,7 @@ def setUpClass(cls): | |
# make sub-submodule | ||
cd subsub | ||
git init . | ||
git checkout -b master | ||
git config user.email "[email protected]" | ||
git config user.name test | ||
echo subsub > test.txt | ||
|
@@ -179,6 +182,7 @@ def setUpClass(cls): | |
# setup first submodule | ||
cd sub | ||
git init . | ||
git checkout -b master | ||
git config user.email "[email protected]" | ||
git config user.name test | ||
echo sub > test.txt | ||
|
@@ -191,6 +195,7 @@ def setUpClass(cls): | |
# setup second submodule | ||
cd sub2 | ||
git init . | ||
git checkout -b master | ||
git config user.email "[email protected]" | ||
git config user.name test | ||
echo sub2 > test.txt | ||
|
@@ -201,6 +206,7 @@ def setUpClass(cls): | |
# setup main module | ||
cd main | ||
git init . | ||
git checkout -b master | ||
git config user.email "[email protected]" | ||
git config user.name test | ||
echo main > test.txt | ||
|