From: Panagiotis Astithas <pastith@gmail.com>
To: gitster@pobox.com
Cc: git@vger.kernel.org, Panagiotis Astithas <pastith@gmail.com>
Subject: [PATCH] Fix power checking on OS X
Date: Tue, 16 Jun 2015 10:36:07 +0300 [thread overview]
Message-ID: <1434440167-1046-1-git-send-email-pastith@gmail.com> (raw)
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
next reply other threads:[~2015-06-16 7:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-16 7:36 Panagiotis Astithas [this message]
2015-06-16 17:32 ` [PATCH] Fix power checking on OS X 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1434440167-1046-1-git-send-email-pastith@gmail.com \
--to=pastith@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).