jobd/gc.sh: switch the gc "signature" hash to use ltsha256
commit8f169d233a9b83cc147803588bbe053e48f18c3c
authorKyle J. McKay <mackyle@gmail.com>
Mon, 29 Jun 2020 22:31:10 +0000 (29 15:31 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Mon, 29 Jun 2020 22:31:10 +0000 (29 15:31 -0700)
tree53e7d913db8c495e94bb042e03c3ff0a3cb14189
parentb4157181bcf941e3578e58e2ba8cbb87252e76fe
jobd/gc.sh: switch the gc "signature" hash to use ltsha256

When generating the final "repack" "signature" hash, ALL of the
existing ref logs are fed into the hash function.

Normally there aren't any ref logs.  However, if any worktrees
exist or the repository has been made not-bare, there very well
could be.  A repository with a lot of ongoing development activity
could potentially have a lot of very long files in the "logs"
subdirectory.

Sucking all of them plus the full packed-refs file into memory
at once shouldn't be a problem...   There really should always
be enough memory to do this...  But, just in case...

Avoid any unnecessary memory bloat (as well as an outdated SHA-1
algorithm) and switch all of the gc "signature" hashes from
using `git hash-object -t blob --stdin` to `ltsha256`.

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