diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-07-11 19:14:03 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-07-11 19:31:26 +0100 |
commit | b7f362f25ab0d961df1e100af7d07165b5ecdfc3 (patch) | |
tree | c6840d4997657d4e852f65e8db641b5d8e2487c4 | |
parent | 7184a61e0bf4b097711965eee629541f54ebf4ec (diff) |
Mirroring: Remove pointless empty .log files
-rwxr-xr-x | infra/dgit-mirror-rsync | 4 | ||||
-rw-r--r-- | tests/lib-mirror | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/infra/dgit-mirror-rsync b/infra/dgit-mirror-rsync index 47142ee..0d29ffb 100755 --- a/infra/dgit-mirror-rsync +++ b/infra/dgit-mirror-rsync @@ -108,7 +108,11 @@ attempt () { exec 3>&2 >"$queue/$package.err" 2>&1 if actually; then rm -f "$queue/$package.a" + exec 2>&3 2>&1 mv -f "$queue/$package.err" "$queue/$package.log" + if ! [ -s "$queue/$package.log" ]; then + rm "$queue/$package.log" + fi rm "$queue/$package.lock" else cat >&3 "$queue/$package.err" diff --git a/tests/lib-mirror b/tests/lib-mirror index c84c30c..a61e02b 100644 --- a/tests/lib-mirror +++ b/tests/lib-mirror @@ -29,7 +29,7 @@ t-check-mirrored () { t-reporefs master t-reporefs mirror $pmirror diff $tmp/show-refs.{master,mirror} - cat $queuedir/$p.log + cat $queuedir/$p.log ||: t-files-notexist $queuedir/$p.{n,a,lock,err} } |