Skip to content

Commit f13f997

Browse files
committed
apply some minor git clone tweaks: added no-tags and single-branch
1 parent 9c5b524 commit f13f997

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

.devcontainer/debian/bookworm/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ ENV PATH="${PATH}:${VCPKG_ROOT}"
343343

344344
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
345345
RUN echo "VCPKG" && \
346-
git clone --depth=1 \
346+
git clone --depth=1 --no-tags \
347347
-c core.eol=lf \
348348
-c core.autocrlf=false \
349349
-c fsck.zeroPaddedFilemode=ignore \
@@ -516,7 +516,7 @@ RUN echo "LLVM udate-alternatives" && \
516516
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
517517
RUN echo "MOLD" && \
518518
version="$(curl -s https://api.github.com/repos/rui314/mold/releases/latest | jq -r '.tag_name' | cut -c 2-)"; echo "Latest Version: \"$version\"" && \
519-
git clone --depth=1 --branch "v$version" https://github.com/rui314/mold.git "/tmp/mold" && \
519+
git clone --branch "v$version" --single-branch --depth 1 --no-tags https://github.com/rui314/mold.git "/tmp/mold" && \
520520
cmake -S /tmp/mold -B /tmp/mold/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++ && \
521521
cmake --build /tmp/mold/build -j "$(nproc)" && \
522522
cmake --install /tmp/mold/build --prefix=/opt/mold && \
@@ -647,9 +647,9 @@ RUN echo "ZSH" && \
647647
# Install Oh My Zsh
648648
curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh | sh && \
649649
# Add Zsh plugins
650-
git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions && \
651-
git clone --depth=1 https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions && \
652-
git clone --depth=1 https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search && \
650+
git clone --depth=1 --no-tags https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions && \
651+
git clone --depth=1 --no-tags https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions && \
652+
git clone --depth=1 --no-tags https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search && \
653653
# Update .zshrc
654654
sed -i "s/plugins=(git)/plugins=(git zsh-completions zsh-autosuggestions zsh-history-substring-search)/" /root/.zshrc && \
655655
sed -i "s/ZSH_THEME=\"agnoster\"/ZSH_THEME=\"robbyrussell\"/" /root/.zshrc && \

.devcontainer/debian/trixie/Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ ENV PATH="${PATH}:${VCPKG_ROOT}"
339339

340340
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
341341
RUN echo "VCPKG" && \
342-
git clone --depth=1 \
342+
git clone --depth=1 --no-tags \
343343
-c core.eol=lf \
344344
-c core.autocrlf=false \
345345
-c fsck.zeroPaddedFilemode=ignore \
@@ -498,7 +498,7 @@ RUN update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100 && \
498498
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
499499
RUN echo "MOLD" && \
500500
version="$(curl -s https://api.github.com/repos/rui314/mold/releases/latest | jq -r '.tag_name' | cut -c 2-)"; echo "Latest Version: \"$version\"" && \
501-
git clone --depth=1 --branch "v$version" https://github.com/rui314/mold.git "/tmp/mold" && \
501+
git clone --branch "v$version" --single-branch --depth 1 --no-tags https://github.com/rui314/mold.git "/tmp/mold" && \
502502
cmake -S /tmp/mold -B /tmp/mold/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++ && \
503503
cmake --build /tmp/mold/build -j "$(nproc)" && \
504504
cmake --install /tmp/mold/build --prefix=/opt/mold && \
@@ -637,9 +637,9 @@ RUN echo "ZSH" && \
637637
# Install Oh My Zsh
638638
curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh | sh && \
639639
# Add Zsh plugins
640-
git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions && \
641-
git clone --depth=1 https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions && \
642-
git clone --depth=1 https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search && \
640+
git clone --depth=1 --no-tags https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions && \
641+
git clone --depth=1 --no-tags https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions && \
642+
git clone --depth=1 --no-tags https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search && \
643643
# Update .zshrc
644644
sed -i "s/plugins=(git)/plugins=(git zsh-completions zsh-autosuggestions zsh-history-substring-search)/" /root/.zshrc && \
645645
sed -i "s/ZSH_THEME=\"agnoster\"/ZSH_THEME=\"robbyrussell\"/" /root/.zshrc && \
@@ -719,7 +719,7 @@ ENV LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 \
719719
# apt-get autoremove -y && \
720720
# apt-get clean autoclean && \
721721
# rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
722-
# git clone --depth=1 https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git --branch $SPIRV_VERSION_TAG && \
722+
# git clone --branch $SPIRV_VERSION_TAG --single-branch --depth=1 --no-tags https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git && \
723723
# mkdir SPIRV-LLVM-Translator/build && \
724724
# cd SPIRV-LLVM-Translator/build && \
725725
# cmake .. -D BASE_LLVM_VERSION=$LLVM_VERSION && \

0 commit comments

Comments
 (0)