taskd/clone.sh: trim excessively large successful .clonelog files
commit067e39d8c2d1951910e612880b5cbf34e8c78653
authorKyle J. McKay <mackyle@gmail.com>
Thu, 12 Aug 2021 02:27:13 +0000 (11 19:27 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Thu, 12 Aug 2021 02:27:13 +0000 (11 19:27 -0700)
tree8f1e8e7f9add533e57227113334e56929d77c52e
parent7f974d528b97f180141c40c59df40243b2b553b4
taskd/clone.sh: trim excessively large successful .clonelog files

If a successful clone's .clonelog file exceeds 10000 lines, trim
it back to the first 5000 lines plus a comment about how many lines
have been omitted plus the last 5000 lines.

Some very long running clones, especially git-svn clones, can produce
multi-megabyte-sized .clonelog files that are not particularly
useful, especially after a successful clone.

Retaining the first and last 5000 lines of such a log file should
more than suffice for a successful clone.

For a failed clone, the .clonelog file remains untouched.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
taskd/clone.sh