When repo initialises a new repository it installs a pre-auto-gc hook
(introduced by http://review.source.android.com/r/c9ef744c7b5f) which is
intended to prevent expensive git gc operations when on a laptop running on
battery.
This script seems to believe that many desktop machines (including Z600s) are
on battery, because they don't have an ACPI AC adapter resource and the script
is checking for evidence that the machine is AC powered (and if not, skipping
the gc) rather than the other way around (checking if it's battery powered).
I realise the hook script itself is just copied from git's examples, but I
guess upstream only expect people to install the hook if they are on a laptop.
Is there any way to update the hook to interpret a return code of 255 from
on_ac_power (meaning it could not determine) as "okay, go ahead and GC"? We
should at least do this for new repo checkouts I think.. many of my
repositories had not been gc'ed ever and were noticeably faster after I forced
it manually.
Original issue reported on code.google.com by torne@google.com on 7 Oct 2011 at 2:43
Original issue reported on code.google.com by
torne@google.com
on 7 Oct 2011 at 2:43