gc.sh: add paranoid check to make_repack_dir
commit93ad841b11c6be360db5ab5a4b9f1aae24bb363c
authorKyle J. McKay <mackyle@gmail.com>
Tue, 15 Nov 2016 02:09:19 +0000 (14 18:09 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Tue, 15 Nov 2016 02:09:19 +0000 (14 18:09 -0800)
tree3f0d1e3ba8d7bac55b0065edaa4188b4d4ee582f
parent55a32ed7b73ec746e5c7c488757bd48bff6dde6d
gc.sh: add paranoid check to make_repack_dir

It's imperative that we do not lose any refs while repacking.
If a disk full error occurs while creating the repack subdirectory
we should error out and do nothing.

However, just in case, add a paranoid check to make sure that the
number of lines in the new packed-refs file in the created repack
subdirectory has the expected number of lines and die if it doesn't.

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