From ef867ecccad5464690c4fa342946fa2c7a4eac3d Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 17 Jul 2024 17:28:27 +0100 Subject: git.sh: remove previous tmprepo if args>5 if doing a retry, the directory may still exist, which would make git clone yield an error response; the existing directory will have been the one that failed to reset, so let's delete it. the one deleted is not the cache (repo/PROJECT/), thus otherwise maintaining current behaviour. Signed-off-by: Leah Rowe --- include/git.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/git.sh b/include/git.sh index ff8b0d97..44afd487 100644 --- a/include/git.sh +++ b/include/git.sh @@ -100,6 +100,7 @@ fetch_submodule() tmpclone() { + [ $# -lt 6 ] || rm -Rf "$3" || $err "git retry: !rm $3 ($1)" repodir="repo/${1##*/}" && [ $# -gt 5 ] && repodir="$3" x_ mkdir -p "repo" if [ -d "$repodir" ] && [ $# -lt 6 ]; then -- cgit v1.2.1