diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2021-03-02 20:13:20 -0500 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2022-04-29 18:42:28 -0400 |
commit | 401e60f2893d689772f716cbd800ee2ee0309362 (patch) | |
tree | e4fa0eb76be9d138b5fe757ed20292af32e50f80 /tests | |
parent | 4bb111c8d4c5692db2f735c2803f632f8c30b6ab (diff) |
Resolve reference for remote repository
Resolves the HEAD reference from the remote repository instead
of assuming "master".
Diffstat (limited to 'tests')
-rw-r--r-- | tests/flakes.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/flakes.sh b/tests/flakes.sh index 46e6a7982..24601784f 100644 --- a/tests/flakes.sh +++ b/tests/flakes.sh @@ -31,7 +31,14 @@ flakeFollowsE=$TEST_ROOT/follows/flakeA/flakeE for repo in $flake1Dir $flake2Dir $flake3Dir $flake7Dir $templatesDir $nonFlakeDir $flakeA $flakeB $flakeFollowsA; do rm -rf $repo $repo.tmp mkdir -p $repo - git -C $repo init + + # Give one repo a non-master initial branch. + extraArgs= + if [[ $repo == $flake2Dir ]]; then + extraArgs="--initial-branch=main" + fi + + git -C $repo init $extraArgs git -C $repo config user.email "foobar@example.com" git -C $repo config user.name "Foobar" done |