Skip to content

Commit 2fd4b44

Browse files
committed
test: use git clone --bare instead of manual mv
1 parent 699f6f4 commit 2fd4b44

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

crates/cargo-test-support/containers/apache/Dockerfile

+3-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ RUN git config --global user.email "[email protected]" &&\
1010
git init -b master . &&\
1111
git add Cargo.toml src &&\
1212
git commit -m "Initial commit" &&\
13-
mv .git ../bar.git &&\
14-
cd ../bar.git &&\
15-
git config --bool core.bare true &&\
16-
rm -rf ../bar
13+
cd .. &&\
14+
git clone --bare bar bar.git &&\
15+
rm -rf bar
1716
WORKDIR /
1817

1918
EXPOSE 443

crates/cargo-test-support/containers/sshd/Dockerfile

+3-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ RUN git config --global user.email "[email protected]" &&\
1717
git init -b master . &&\
1818
git add Cargo.toml src &&\
1919
git commit -m "Initial commit" &&\
20-
mv .git ../bar.git &&\
21-
cd ../bar.git &&\
22-
git config --bool core.bare true &&\
23-
rm -rf ../bar
20+
cd .. &&\
21+
git clone --bare bar bar.git &&\
22+
rm -rf bar
2423
WORKDIR /
2524
USER root
2625

0 commit comments

Comments
 (0)