git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix power checking on OS X
@ 2015-06-16  7:36 Panagiotis Astithas
  2015-06-16 17:32 ` Junio C Hamano
  0 siblings, 1 reply; 9+ messages in thread
From: Panagiotis Astithas @ 2015-06-16  7:36 UTC (permalink / raw)
  To: gitster; +Cc: git, Panagiotis Astithas

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>
---
 contrib/hooks/pre-auto-gc-battery | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/hooks/pre-auto-gc-battery b/contrib/hooks/pre-auto-gc-battery
index 9d0c2d1..6a2cdeb 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
-- 
2.4.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [PATCH] Fix power checking on OS X
@ 2015-06-11 14:37 Panagiotis Astithas
  2015-06-12  3:46 ` Eric Sunshine
  0 siblings, 1 reply; 9+ messages in thread
From: Panagiotis Astithas @ 2015-06-11 14:37 UTC (permalink / raw)
  To: git; +Cc: vmiklos, jon.delStrother, jrnieder, Panagiotis Astithas

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>
---
 contrib/hooks/pre-auto-gc-battery | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/hooks/pre-auto-gc-battery b/contrib/hooks/pre-auto-gc-battery
index 9d0c2d1..6a2cdeb 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
-- 
2.4.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-06-16 17:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-16  7:36 [PATCH] Fix power checking on OS X Panagiotis Astithas
2015-06-16 17:32 ` Junio C Hamano
2015-06-16 17:35   ` Panagiotis Astithas
2015-06-16 17:57     ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2015-06-11 14:37 Panagiotis Astithas
2015-06-12  3:46 ` Eric Sunshine
2015-06-12  8:53   ` Panagiotis Astithas
2015-06-12 14:54     ` Junio C Hamano
2015-06-12 15:58     ` Eric Sunshine

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).