From d5136450c2456ce369c6516f8604bd0e9b927e63 Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Wed, 16 Dec 2020 17:16:39 +0200 Subject: [PATCH] docker/fedora: run git gc after cloning the subprojects Most of the subprojects specify depth=1 in the wrap file, so this doesn't have a big effect atm. Part-of: --- docker/fedora/prepare.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker/fedora/prepare.sh b/docker/fedora/prepare.sh index 60f877de4e..bc13d9d99c 100644 --- a/docker/fedora/prepare.sh +++ b/docker/fedora/prepare.sh @@ -238,3 +238,9 @@ rustc --version git clone -b ${DEFAULT_BRANCH} https://gitlab.freedesktop.org/gstreamer/gst-build.git /gst-build/ cd /gst-build meson subprojects download + +# Run git gc to prune unwanted refs and reduce the size of the image +for i in $(find subprojects/ -mindepth 1- maxdepth 1 -type d); +do + git -C $i gc --aggressive || true; +done \ No newline at end of file