jobd/gc.sh: add repack "signature" hash
commit2c7f92cf7d463b43090f3c9980b69d4c01158cd0
authorKyle J. McKay <mackyle@gmail.com>
Mon, 29 Jun 2020 06:03:26 +0000 (28 23:03 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Mon, 29 Jun 2020 06:03:26 +0000 (28 23:03 -0700)
treeb6fb193104eaee155ff5f97923501b8e58192a3e
parent520902cd741f225665595a50c094893e50186cda
jobd/gc.sh: add repack "signature" hash

When deciding whether or not to skip gc, everything that might be
caught up in the supplementary packs must be considered.

Create a "signature" hash for the constructed `repack` subdirectory
that reflects all of the refs that are packed during gc as well as
anything that may be referenced by ref logs since the supplementary
pack creation process uses the `--reflog` option when running the
`git pack-objects` command.

If the only thing that happens since the last "gc" run is to expire
some ref logs, that means the supplementary packs will need to be
rebuilt to remove any newly unreachable objects.o

By including the contents of the various ref logs in the data used
to create a "signature" hash for the `repack` subdirectory this can
easily be accomplished.

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