From 6398d67067837fe2a77d5d5290fec85719a02a8c Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 27 May 2022 13:19:51 +0200 Subject: clone to NAME.git folders It seems to be the convention and the default behaviour of `git clone --bare`, so do that. --- test/integration/docker/test.sh | 2 +- test/integration/example/test.sh | 6 +++--- test/integration/local/test.sh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/integration/docker/test.sh b/test/integration/docker/test.sh index 239385e..7b5b4df 100755 --- a/test/integration/docker/test.sh +++ b/test/integration/docker/test.sh @@ -162,7 +162,7 @@ verify() { echo Checking the pulled repository echo ---------------------------------------------------------------------- - pushd -- "$script_dir/cgitize/output/test_repo" > /dev/null + pushd -- "$script_dir/cgitize/output/test_repo.git" > /dev/null git log --oneline popd > /dev/null } diff --git a/test/integration/example/test.sh b/test/integration/example/test.sh index 6e38729..e22cec1 100755 --- a/test/integration/example/test.sh +++ b/test/integration/example/test.sh @@ -67,7 +67,7 @@ verify_origin() { echo "Verifying origin: $repo" echo ---------------------------------------------------------------------- - local repo_dir="$output_dir/$repo" + local repo_dir="$output_dir/$repo.git" local actual actual="$( GIT_DIR="$repo_dir" git config --get remote.origin.url )" @@ -90,7 +90,7 @@ verify_repos() { echo "Verifying repository: $repo" echo ---------------------------------------------------------------------- - local repo_dir="$output_dir/$repo" + local repo_dir="$output_dir/$repo.git" GIT_DIR="$repo_dir" git rev-parse HEAD > /dev/null echo 'HEAD is fine.' @@ -111,7 +111,7 @@ verify_no_repos() { echo "Verifying repository doesn't exist: $repo" echo ---------------------------------------------------------------------- - local repo_dir="$output_dir/$repo" + local repo_dir="$output_dir/$repo.git" if [ -e "$repo_dir" ]; then echo "Exists, but it shouldn't." return 1 diff --git a/test/integration/local/test.sh b/test/integration/local/test.sh index 3c73543..68c78ec 100755 --- a/test/integration/local/test.sh +++ b/test/integration/local/test.sh @@ -141,7 +141,7 @@ verify_commits() { # doesn't work: https://stackoverflow.com/q/4072984/514684 # TODO: figure this out? pushd -- "$output_dir" > /dev/null && - cd -- test_repo && + cd -- test_repo.git && local output && output="$( git log --oneline )" && echo "$output" && -- cgit v1.2.3