jobd/gc.sh: rename variable to avoid confusion
commitcbeaefb81084c6428c9ee53cab87cbbd3d34e2a2
authorKyle J. McKay <mackyle@gmail.com>
Sun, 28 Jun 2020 20:49:37 +0000 (28 13:49 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Sun, 28 Jun 2020 20:49:37 +0000 (28 13:49 -0700)
tree004f980cbc396300fc84395ffd606eeb1eda66fe
parente58fe83faf7b55457f1e2f47a1f338bacdce475e
jobd/gc.sh: rename variable to avoid confusion

When processing forks of the project being gc'd, a variable named
`packs` is used to count the number of packs present in each fork
to determine whether or not the fork now `.needsgc`.

The variable name used is `packs`.

At first glance, this would seem to be very bad as the list of
primary packs is stored in the variable named `packs` and bad
things would happen if it gets stepped on before it's last needed.

However, the forks are processed in an implicit subshell courtesy
of a `|` and therefore stepping on the `packs` variable in that
subshell has no effect on the `packs` variable outside the subshell.

Nevertheless, change the name of the variable used in the subshell
to avoid confusion and avoid a surprise bug if at some point in the
future that code no longer runs in a subshell.

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