Skip to content

Commit

Permalink
test: use git clone --bare instead of manual mv
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanglo committed May 16, 2024
1 parent 699f6f4 commit 2fd4b44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions crates/cargo-test-support/containers/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions crates/cargo-test-support/containers/sshd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 2fd4b44

Please sign in to comment.