From 2fd4b440bcfc5a552fc428f912fcae4884b46b00 Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Wed, 15 May 2024 23:43:11 -0400 Subject: [PATCH] test: use `git clone --bare` instead of manual `mv` --- crates/cargo-test-support/containers/apache/Dockerfile | 7 +++---- crates/cargo-test-support/containers/sshd/Dockerfile | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/crates/cargo-test-support/containers/apache/Dockerfile b/crates/cargo-test-support/containers/apache/Dockerfile index 2940ee7c6f6..926f4c35365 100644 --- a/crates/cargo-test-support/containers/apache/Dockerfile +++ b/crates/cargo-test-support/containers/apache/Dockerfile @@ -10,10 +10,9 @@ RUN git config --global user.email "testuser@example.com" &&\ git init -b master . &&\ git add Cargo.toml src &&\ git commit -m "Initial commit" &&\ - mv .git ../bar.git &&\ - cd ../bar.git &&\ - git config --bool core.bare true &&\ - rm -rf ../bar + cd .. &&\ + git clone --bare bar bar.git &&\ + rm -rf bar WORKDIR / EXPOSE 443 diff --git a/crates/cargo-test-support/containers/sshd/Dockerfile b/crates/cargo-test-support/containers/sshd/Dockerfile index 2c055bbc200..e6187750aee 100644 --- a/crates/cargo-test-support/containers/sshd/Dockerfile +++ b/crates/cargo-test-support/containers/sshd/Dockerfile @@ -17,10 +17,9 @@ RUN git config --global user.email "testuser@example.com" &&\ git init -b master . &&\ git add Cargo.toml src &&\ git commit -m "Initial commit" &&\ - mv .git ../bar.git &&\ - cd ../bar.git &&\ - git config --bool core.bare true &&\ - rm -rf ../bar + cd .. &&\ + git clone --bare bar bar.git &&\ + rm -rf bar WORKDIR / USER root