Re: [PATCH v2 2/2] gc: config option for running --auto in background
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Feb 10, 2014, 13:17 UTC
- Message-ID
- <CACsJy8BBQ3Bh6q6JM8V-QVKfzwp1w99+u4_55jjGbHLV3c62gA@mail.gmail.com>
- In-Reply-To
- <CABPQNSb3=i8F+vPEG3RmH+snZVZ-xrPtcVY2Nx9uvyTCLXcy6g@mail.gmail.com>
On Mon, Feb 10, 2014 at 6:03 PM, Erik Faye-Lund <kusmabite@gmail.com> wrote:
Show 21 quoted lines
>> `gc --auto` takes time and can block the user temporarily (but not any
>> - if (!quiet)
>> - fprintf(stderr,
>> - _("Auto packing the repository for optimum performance. You may also\n"
>> - "run \"git gc\" manually. See "
>> - "\"git help gc\" for more information.\n"));
>> + if (!quiet) {
>> + if (detach_auto)
>> + fprintf(stderr, _("Auto packing the repository in background for optimum performance.\n"));
>> + else
>> + fprintf(stderr, _("Auto packing the repository for optimum performance.\n"));
>> + fprintf(stderr, _("See \"git help gc\" for manual housekeeping.\n"));
>> + }
>> + if (detach_auto)
>> + /*
>> + * failure to daemonize is ok, we'll continue
>> + * in foreground
>> + */
>> + daemonize();
>
> While I agree that it should be OK, shouldn't we warn the user?If --quiet is set, we should not be printing anyway. If not, I thinkg we could only print "auto packing in background.." when we actually can do that, else just print the old message. It means an #ifdef NO_POSIX_GOODIES here again though..
-- Duy