From f6ecc0322f0a32f43143ac09403a171261ecfa96 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Sat, 15 Aug 2020 22:01:54 -0700 Subject: [PATCH] taskd/clone.sh: exclude reposize from external message While it would be nice to report the actual source repository size in the external message being sent, that could only be done if the entire source repository had been cloned to the local machine. Exactly what the max_file_size512 setting prevents from happening. Instead, just report the failing local size to the .clone_failed_exceeds_limit file in case it may be useful. Signed-off-by: Kyle J. McKay --- taskd/clone.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/taskd/clone.sh b/taskd/clone.sh index 8e9c839..1e1aaa6 100755 --- a/taskd/clone.sh +++ b/taskd/clone.sh @@ -120,7 +120,7 @@ send_clone_failed() { fi xfsz_err=" -The source repository${reposize:+ ($reposize)} exceeds our maximum allowed repository size." +The source repository exceeds our maximum allowed repository size." clear_all_objects_and_packs fi xobjs_err="" @@ -136,6 +136,8 @@ The source repository${exit_objs:+ ($exit_objs objects)} exceeds our maximum all # message(s) in both .clone_failed_exceeds_limit and .clonelog >.clone_failed_exceeds_limit if [ -n "$xfsz_err" ]; then + [ -z "$reposize" ] || + printf '%s\n' "repository size at failure: $reposize" >>.clone_failed_exceeds_limit printf '%s\n' "${xfsz_err#??}" >>.clone_failed_exceeds_limit printf '%s\n' "${xfsz_err#?}" >>.clonelog fi -- 2.11.4.GIT