summaryrefslogtreecommitdiff
path: root/contrib/hooks
diff options
context:
space:
mode:
authorPanagiotis Astithas <pastith@gmail.com>2015-06-11 17:37:25 +0300
committerJunio C Hamano <gitster@pobox.com>2015-06-12 15:33:39 -0700
commitc54c7b376d73d2b3780475b18a6039721019aaba (patch)
tree0358d6f62b2b393561d3f8592c6d2b0273b247d0 /contrib/hooks
parentfdf96a20acf96a6ac538df8113b2aafd6ed71d50 (diff)
downloadgit-c54c7b376d73d2b3780475b18a6039721019aaba.tar.gz
hooks/pre-auto-gc: adjust power checking for newer OS Xpa/auto-gc-mac-osx
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>
Diffstat (limited to 'contrib/hooks')
-rwxr-xr-xcontrib/hooks/pre-auto-gc-battery2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/hooks/pre-auto-gc-battery b/contrib/hooks/pre-auto-gc-battery
index 9d0c2d1990..6a2cdebdb7 100755
--- a/contrib/hooks/pre-auto-gc-battery
+++ b/contrib/hooks/pre-auto-gc-battery
@@ -33,7 +33,7 @@ elif grep -q "AC Power \+: 1" /proc/pmu/info 2>/dev/null
then
exit 0
elif test -x /usr/bin/pmset && /usr/bin/pmset -g batt |
- grep -q "Currently drawing from 'AC Power'"
+ grep -q "drawing from 'AC Power'"
then
exit 0
fi