jobd/gc.sh: ameliorate alarming combine-packs message
commit8017a1acfaa4b810c94a3f173cdaab7771b80c8b
authorKyle J. McKay <mackyle@gmail.com>
Mon, 10 Aug 2020 21:00:01 +0000 (10 14:00 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Mon, 10 Aug 2020 21:00:01 +0000 (10 14:00 -0700)
treef5c7824d9ca08a20dbb65b4b9d35bdb3abff932d
parent3fc7b2b0223520287b7a9eeb0c542070d261105f
jobd/gc.sh: ameliorate alarming combine-packs message

The combine-packs.sh command may spew a message like this:

    combine-packs: fatal: missing 5 object(s)

On the surface, that may seem quite alarming.

However, in the case of the `make_needs_pack` function, it's
possible that the incoming loose objects are not fully connected
in which case the failure will be ignored and they will be
packed later with `--weak-naming` which does not require full
connectivity (at the expense of just-slightly larger packs).

When the `make_needs_pack` function ends up ignoring a fatal
combine-packs error, output another message to STDERR as a
follow up mentioning that --weak-naming will be used instead
to avoid unnecessary alarm over the combine-packs fatal message.

While it would, indeed, be possible to send the combine-packs
output (including STDERR) to /dev/null instead, that could
potentially hide useful diagnostic information in the event of
some other kind of fatal error that's not just about missing
objects.  That would be less than ideal, hence the new
follow-up message instead.

Additionally, the new follow-up message includes the project
name to help identify the offending source of the
misunderdisconnected [sic] objects.

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