Skip to content

Commit

Permalink
tests: configure git in the bare repository
Browse files Browse the repository at this point in the history
Related-to: 21
  • Loading branch information
davvid committed Jan 13, 2024
1 parent a638f36 commit 32968e6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tests/integration/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,15 @@ main () {
(
cd "./$1"
git init --quiet
git config user.name Garden
git config user.email [email protected]
git config init.defaultBranch garden
configure_git
git commit --quiet --allow-empty -m'Root directory'
mkdir -p repos
# Create repos/example.git
git init ${quiet} --bare repos/example.git
(
# Create an empty commit
cd ./repos/example.git
configure_git

tree=$(git write-tree)
git commit-tree -m "$1" "$tree" >refs/heads/default
Expand All @@ -41,4 +40,10 @@ main () {
)
}

configure_git () {
git config user.name Garden
git config user.email [email protected]
git config init.defaultBranch garden
}

main "$@"

0 comments on commit 32968e6

Please sign in to comment.