* Re: [PATCH] git gc --auto: defer on battery
@ 2008-03-30 23:46 Linus Torvalds
2008-03-31 9:36 ` [PATCH 3/4] Documentation/hooks: add pre-auto-gc hook Miklos Vajna
0 siblings, 1 reply; 2+ messages in thread
From: Linus Torvalds @ 2008-03-30 23:46 UTC (permalink / raw)
To: Bj?rn Steinbrink; +Cc: Miklos Vajna, Junio C Hamano, git
On Mon, 31 Mar 2008, Bj?rn Steinbrink wrote:
>
> The /proc stuff is already deprecated IIRC, the new file to check on
> Linux is /sys/class/power_supply/AC/online.
I would *seriously* suggest making this soem kind of generic callback and
not Linux-specific.
How about making it more akin to a pre-auto-gc "hook" - run a script
instead of hardcoding something like this!
Linus
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 3/4] Documentation/hooks: add pre-auto-gc hook
2008-03-30 23:46 [PATCH] git gc --auto: defer on battery Linus Torvalds
@ 2008-03-31 9:36 ` Miklos Vajna
0 siblings, 0 replies; 2+ messages in thread
From: Miklos Vajna @ 2008-03-31 9:36 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Bj?rn Steinbrink, Junio C Hamano, git
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
Documentation/hooks.txt | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/Documentation/hooks.txt b/Documentation/hooks.txt
index 76b8d77..04ec352 100644
--- a/Documentation/hooks.txt
+++ b/Documentation/hooks.txt
@@ -276,3 +276,13 @@ probably enable this hook.
Both standard output and standard error output are forwarded to
`git-send-pack` on the other end, so you can simply `echo` messages
for the user.
+
+pre-auto-gc
+-----------
+
+This hook is invoked by `git-gc --auto`, and can be bypassed with
+`\--no-verify` option. It takes no parameter, and exiting with non-zero
+status from this script causes the `git-gc --auto` to abort.
+
+The default 'pre-auto-gc' hook, when enabled, defers auto repacking when
+you are on battery.
--
1.5.5.rc2.4.g283c6
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-01 5:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <0a4fb03744d2a8c3e38030a29098e25823aed6bc.1206929014.git.vmiklos @frugalware.org>
2008-04-01 5:02 ` [PATCH 3/4] Documentation/hooks: add pre-auto-gc hook Junio C Hamano
2008-03-30 23:46 [PATCH] git gc --auto: defer on battery Linus Torvalds
2008-03-31 9:36 ` [PATCH 3/4] Documentation/hooks: add pre-auto-gc hook Miklos Vajna
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).