Subject: Re: [PATCH] git gc --auto: defer on battery

From: Miklos Vajna <[email-masked]>
Date: Mon, 31 Mar 2008 01:53:22 +0200

On Mon, Mar 31, 2008 at 01:41:18AM +0200, Johannes Schindelin <[email-masked]> wrote:
> And what about system dependency?  I mean, if at all, this stuff belongs 
> to compat/.  Definitely not into builtin-gc.c.  And yes, that means that 
> you should not call the function is_on_battery() blindly, but _only_ if 
> defer_on_battery is set.

Hm, should I just move it to there or should there be some kind of
check? Currently it just tries to open that file under /sys and if
fails, it just assumes we are not on battery. I think that's the
expected behaviour on systems not having a /sys filesystem.

As far as I see, compat/ is for functions which are available on some
systems but not an all ones. Obviously is_on_battery() won't be available
on any system. :)

The other issues (I hope) are fixed in the second patch.