gc.sh: do not lose a detached HEAD
commitabeb7dc857266e23b9533b2aaddcb7b32182fbf1
authorKyle J. McKay <mackyle@gmail.com>
Mon, 27 Nov 2017 22:54:29 +0000 (27 14:54 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Mon, 27 Nov 2017 22:54:29 +0000 (27 14:54 -0800)
treefd20de694df6e62a31a90f9ab074550f54165ea0
parentc5025f48e704d8b97f4d0d2c91080d713a468c1e
gc.sh: do not lose a detached HEAD

Officially Girocco does not support any repositories having anything
other than a symbolic-ref HEAD into the refs/heads/... namespace.

However, there's nothing to stop a perverse adminstrator from
creating a detached HEAD using the command line.

Make sure that any such detached HEAD ends up in the main (and
bitmapped for non-forks) pack during a repack operation.

Without this change if a detached HEAD were otherwise unreachable
it would eventually be lost.

But henceforth it shall be lost no more.

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