update.sh: keep refs packed after an update
commitcafbc3250770cd821eb57020be6e410d6c14da54
authorKyle J. McKay <mackyle@gmail.com>
Thu, 2 Apr 2020 00:04:51 +0000 (1 17:04 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Thu, 2 Apr 2020 00:04:51 +0000 (1 17:04 -0700)
treef76659806e0f57d52d682bebd9dca61ba7262b83
parentead4b9c249023bf28fa9596715287c2cb979a488
update.sh: keep refs packed after an update

If a mirror fetch succeeds and ends up changing any refs, go
ahead and run `git pack-refs --all` to pack them all up again.

Mirrors that often fetch changes may rack up an awful lot of
loose refs that impede performance.

Since mirror updates only happen every once in a while it's
reasonable to always pack-refs at the end of an update that
actually fetches any ref changes.

If for some reason git is unable to pack and prune all the refs
(perhaps some kind of directory permissions issue), it's safe to
just ignore the error and continue anyway as all the refs will
still be there, just not fully packed.

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