Commit 1ca40d71 authored by Alexandros Frantzis's avatar Alexandros Frantzis

Ensure traces-db .git storage consumption remains low

During git operations various git objects get created which may take up
significant space. Store a clean .git instance, which we restore after
various git operations to keep our storage consumption low.
Signed-off-by: Alexandros Frantzis's avatarAlexandros Frantzis <alexandros.frantzis@collabora.com>
parent d01df7c4
#!/usr/bin/env bash
create_clean_git()
{
rm -rf .clean_git
cp -R .git .clean_git
}
restore_clean_git()
{
rm -rf .git
cp -R .clean_git .git
}
fetch_trace()
{
_trace="${1//,/?}"
......@@ -11,6 +23,7 @@ fetch_trace()
else
echo "OK"
fi
restore_clean_git
}
fetch_reference_images()
......@@ -26,8 +39,15 @@ fetch_reference_images()
else
echo "OK"
fi
restore_clean_git
}
# During git operations various git objects get created which
# may take up significant space. Store a clean .git instance,
# which we restore after various git operations to keep our
# storage consumption low.
create_clean_git
fetch_reference_images "$DEVICE_NAME" "$1"
ret=0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment