hooks/pre-auto-gc: adjust power checking for newer OS X

The output of "pmset -g batt" changed at some point from "Currently drawing from 'AC Power'" to the slightly different "Now drawing from 'AC Power'". Starting the match from "drawing" makes the check work in both old and new versions of OS X. Signed-off-by: Panagiotis Astithas <pastith@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Panagiotis Astithas committed Jun 11, 2015 at 17:37 UTC c54c7b376d73d2b3780475b18a6039721019aaba
1 file changed +1 -1
contrib/hooks/pre-auto-gc-battery
+1 -1
@@ -33,7 +33,7 @@ elif grep -q "AC Power \+: 1" /proc/pmu/info 2>/dev/null
33 then
34 exit 0
35 elif test -x /usr/bin/pmset && /usr/bin/pmset -g batt |
36 - grep -q "Currently drawing from 'AC Power'"
36 + grep -q "drawing from 'AC Power'"
37 then
38 exit 0
39 fi